Title: fix(copilot): strip platform-managed apiKey on hosted-tool blocks in edit_workflow by TheodoreSpeaks · Pull Request #5217 · simstudioai/sim · GitHub
Open Graph Title: fix(copilot): strip platform-managed apiKey on hosted-tool blocks in edit_workflow by TheodoreSpeaks · Pull Request #5217 · simstudioai/sim
X Title: fix(copilot): strip platform-managed apiKey on hosted-tool blocks in edit_workflow by TheodoreSpeaks · Pull Request #5217 · simstudioai/sim
Description: Summary The copilot intermittently authored apiKey: "{{FAL_API_KEY}}" (and similar) onto hosted-tool blocks like the Fal video/image generators. On hosted Sim this both disabled hosted-key injection (a non-empty inline key short-circuits injectHostedKeyIfNeeded) and misled the agent into telling users they must bring their own key. edit_workflow's preValidateCredentialInputs already stripped+warned for hosted LLM models (getHostedModels()), but that path only covers Agent/Router blocks — tool-hosted blocks slipped through. Generalized the strip to key off tool.hosting — the same canonical signal injectHostedKeyIfNeeded uses at execution, so validator and execution agree by construction: resolves the block's active tool via its tools.config.tool selector (so provider: falai → video_falai), honors the per-provider hosting.enabled gate (e.g. image_generate falai-only), strips the exact hosting.apiKeyParam field (no hardcoded "apiKey" assumption), surfaces the existing non-fatal note back to the agent (success: true preserved). Self-hosted (isHosted=false) and non-hosted providers (Runway/Veo/Luma/MiniMax) are untouched. Type of Change Bug fix Testing vitest on validation.test.ts: 31 passed (added hosted-tool cases — provider routing, edit-op provider resolution from workflow state, nested-in-loop, non-apiKey field name, enabled-gate pass/fail, self-hosted preserved) bun run lint:check: clean bun run check:api-validation:strict: passed tsc --noEmit: clean Checklist Code follows project style guidelines Self-reviewed my changes Tests added/updated and passing No new warnings introduced I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)
Open Graph Description: Summary The copilot intermittently authored apiKey: "{{FAL_API_KEY}}" (and similar) onto hosted-tool blocks like the Fal video/image generators. On hosted Sim this both disabled hosted-k...
X Description: Summary The copilot intermittently authored apiKey: "{{FAL_API_KEY}}" (and similar) onto hosted-tool blocks like the Fal video/image generators. On hosted Sim this both disabled ...
Opengraph URL: https://github.com/simstudioai/sim/pull/5217
X: @github
Domain: github.com
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:1cd3e8f8-6578-6752-529c-3739f1f6c091 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | E616:3C556:72CAF4:9F2368:6AFB436A |
| html-safe-nonce | 6e7963a6f42aa0b22070371b35e582e38045a3cd888b3bf6a47bdf0f03afbe45 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNjE2OjNDNTU2OjcyQ0FGNDo5RjIzNjg6NkFGQjQzNkEiLCJ2aXNpdG9yX2lkIjoiNzkxMTE5NzY0NzgzMjgyNjczMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | b6937d9b074c39acb9fd72d5d0f97166873ed2a1ff3c941cd6223df60edf5041 |
| hovercard-subject-tag | pull_request:3938722812 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/simstudioai/sim/pull/5217/files |
| twitter:image | https://avatars.githubusercontent.com/u/19564703?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/19564703?s=400&v=4 |
| og:image:alt | Summary The copilot intermittently authored apiKey: "{{FAL_API_KEY}}" (and similar) onto hosted-tool blocks like the Fal video/image generators. On hosted Sim this both disabled hosted-k... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | d849b928f455c800985398e7f1b659425adb312a5fa14fba5d9a14e62e9fe5dd |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/simstudioai/sim git https://github.com/simstudioai/sim.git |
| octolytics-dimension-user_id | 199344406 |
| octolytics-dimension-user_login | simstudioai |
| octolytics-dimension-repository_id | 912559512 |
| octolytics-dimension-repository_nwo | simstudioai/sim |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 912559512 |
| octolytics-dimension-repository_network_root_nwo | simstudioai/sim |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | a6c2f87cbcb6414452377b4967858ed6a66f1109 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width