Title: improvement(executor): run the Agent block on the shared model-fallback walk by waleedlatif1 · Pull Request #9982 · simstudioai/sim · GitHub
Open Graph Title: improvement(executor): run the Agent block on the shared model-fallback walk by waleedlatif1 · Pull Request #9982 · simstudioai/sim
X Title: improvement(executor): run the Agent block on the shared model-fallback walk by waleedlatif1 · Pull Request #9982 · simstudioai/sim
Description: Summary One shared fallback walk. Router, Evaluator and the Agent block now walk their model candidates through walkModelCandidates in executor/utils/model-fallbacks.ts. Before, the Agent kept its own copy of the walk. The walk owns: the candidate order; holding fallbacks until the final try; de-duplication; skipping unusable fallbacks (provider, permission, family); resolving the saved credential once per call for candidates on the primary's provider; the stop rules; the block-log modelFallbacks record. Callers supply three pieces: an attempt, an optional prepare (a fallback that throws there is skipped, not counted as a failure), and skip/fallback log callbacks. executeModelRequestWithFallbacks is now a thin wrapper. The Agent keeps its own behavior in its callbacks: Per-provider file hydration moves into prepare, which runs against the settled registries without mutating ctx. A fallback whose provider can't take the attached files is skipped. Stream priming, the deep-research hold, the evaluation-model refusal and the log text are unchanged. The manual save/restore of the error registries is gone. A fallback swaps ctx to the settled registries once, when its attempt starts. No behavior change for any of the three blocks. Type of Change Improvement (refactor) Testing The existing agent, router, evaluator and model-fallback-request tests pass unchanged; they serve as the behavior spec. New tests: A primary failure followed by an attachment-skipped fallback rethrows the primary's error, redacted against the failed attempt's registries. A later fallback runs from the settled registries. The walk doesn't count a prepare skip as a failure, and rethrows the last real error when only skips remain. Red proofs: Removing the registry swap or the skip semantics fails the new tests. The new Agent tests also pass against the previous Agent loop, which shows behavior is preserved. Runs: 1,894 executor and lib/workflows/blocks tests pass. bun run lint, check-block-registry.ts origin/staging, check:test-patterns, check:comment-hygiene, check:explicit-any, check:boundaries, check:utils, check:file-names and check:tool-registry-boundary --check pass. Type-check and the full suite run in CI. Checklist Code follows project style guidelines Self-reviewed my changes Tests added/updated and passing (new tests pass the test-audit authoring gate) 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 One shared fallback walk. Router, Evaluator and the Agent block now walk their model candidates through walkModelCandidates in executor/utils/model-fallbacks.ts. Before, the Agent kept its...
X Description: Summary One shared fallback walk. Router, Evaluator and the Agent block now walk their model candidates through walkModelCandidates in executor/utils/model-fallbacks.ts. Before, the Agent kept its...
Opengraph URL: https://github.com/simstudioai/sim/pull/9982
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:7911ff4f-c96a-8c09-133b-734feb14a2c1 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | E880:3ED756:172AD4:204AAA:6AFB4E14 |
| html-safe-nonce | 04bd04b28bb34211afb31dcaaa5839720c0099e4f09d75daa358c1f20db31fae |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFODgwOjNFRDc1NjoxNzJBRDQ6MjA0QUFBOjZBRkI0RTE0IiwidmlzaXRvcl9pZCI6IjIxNTA0NjMyNzkwNjE0ODcxMjQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 6c416b8b77a126053288dd0a925c87744114b51e2d14feaac9db7ccae68da146 |
| hovercard-subject-tag | pull_request:5290172082 |
| 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/9982/files |
| twitter:image | https://avatars.githubusercontent.com/u/40672544?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/40672544?s=400&v=4 |
| og:image:alt | Summary One shared fallback walk. Router, Evaluator and the Agent block now walk their model candidates through walkModelCandidates in executor/utils/model-fallbacks.ts. Before, the Agent kept its... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | acf7616d06cc051644705b379878c9bb13dc5e70ecf4ffd9b34140f8ac01d7e1 |
| 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 | 26504db649b58525278f77a52b80ba5f10d5f4de |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width