René's URL Explorer Experiment


Title: fix(logger, blocks): log nested errors and stop spurious model-selection warnings by waleedlatif1 · Pull Request #6706 · simstudioai/sim · GitHub

Open Graph Title: fix(logger, blocks): log nested errors and stop spurious model-selection warnings by waleedlatif1 · Pull Request #6706 · simstudioai/sim

X Title: fix(logger, blocks): log nested errors and stop spurious model-selection warnings by waleedlatif1 · Pull Request #6706 · simstudioai/sim

Description: Summary Two chronic defects found while auditing production logs. Neither is release-related — both predate v0.8.1. 1. logger.x('msg', { error }) logged error: {} at 399 call sites. mergeArgs copied object arguments verbatim, so an Error held under a key stayed an Error instance — and JSON.stringify renders that as {}, because message and stack are non-enumerable on Error.prototype. A bare Error argument was handled correctly; an error inside an object was not. This is why BlockOutputs :: Failed to get tool outputs (10k/week) was undiagnosable. The colorized/dev path had the same hole via formatObject, so a developer running locally saw the bug too. Unwrap keyed Errors on both the structured and colorized paths. error stays a plain message string so log queries can stats count(*) by error; richer diagnostics remain opt-in via describeError. 2. Router/Evaluator/Agent logged Invalid model selected ~140×/day. config.tool resolved through getBaseModelProviders(), which deliberately excludes gateway providers (OpenRouter, vLLM, LiteLLM, Ollama, fireworks, together, baseten). So a fully valid openrouter/meta-llama/llama-4-maverick threw, as did a model still holding an unresolved at serialization time. The serialized value is cosmetic — every one of these blocks re-derives the provider from the resolved model at execution (router-handler.ts:112, evaluator-handler.ts:177), and agent.ts already documented that it "never reads this serialized value". So the throw bought nothing and produced an error users cannot act on. Resolve through getProviderFromModel, the same resolver the executor uses, so serialization and execution finally agree. One shared helper replaces four near-identical inline implementations. Drop the unreachable if (!model) checks sitting behind params.model || 'gpt-4o'. Type of Change Bug fix Testing 1,189 tests pass across blocks, serializer, providers and executor handlers, plus the logger package; type-check and biome clean. New tests, including two added specifically because review found the first pass insufficient: Logger: keyed Error renders as its message on both paths; a non-conventional key doesn't hijack stack; sibling keys survive. Verified they fail without the fix with expected {} to be 'boom' — the exact production symptom. Blocks: gateway model resolves; unresolved reference falls back; caller fallback honoured; never throws even when the resolver rejects every model (an env blacklist can reject the fallback too). Providers: a test through the real resolver proving openrouter/* resolves via modelPatterns and that getBaseModelProviders() omits it — the mocked helper test alone would have passed even if the fix were deleted. Notes #2 has no user-facing impact — I checked before treating it as one. getToolParams returns undefined for both the provider id and the access[0] fallback (neither is a registered tool), so the dependent validation was skipped either way. This removes log noise and makes serialization agree with execution; it does not change behavior. 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 Two chronic defects found while auditing production logs. Neither is release-related — both predate v0.8.1. 1. logger.x('msg', { error }) logged error: {} at 399 call sites. mergeAr...

X Description: Summary Two chronic defects found while auditing production logs. Neither is release-related — both predate v0.8.1. 1. logger.x('msg', { error }) logged error: {} at 399 call sites....

Opengraph URL: https://github.com/simstudioai/sim/pull/6706

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,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-controllerpull_requests
route-actionfiles
fetch-noncev2:14b90e10-f623-af08-cf1a-4a63fc6d9644
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idC1AA:1D4A3:B290F1:F4C5DE:6AFB5181
html-safe-nonce287622029b126bebc1e23e3dbb1e7709fbd3e40daefe3edddf51b4a7016a1268
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMUFBOjFENEEzOkIyOTBGMTpGNEM1REU6NkFGQjUxODEiLCJ2aXNpdG9yX2lkIjoiNDM2OTIwODY3NjU0NDM2OTAyNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac35c6e0b5078f00f5a5a8f7fe5df29d797fb93d399c793dc40c1248100d9dc2c5
hovercard-subject-tagpull_request:4282995612
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/simstudioai/sim/pull/6706/files
twitter:imagehttps://avatars.githubusercontent.com/u/40672544?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/40672544?s=400&v=4
og:image:altSummary Two chronic defects found while auditing production logs. Neither is release-related — both predate v0.8.1. 1. logger.x('msg', { error }) logged error: {} at 399 call sites. mergeAr...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None7122bb414b542dba14d71a3f0b9f6fd2abce715b9f5912d082800563e6c806d1
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/simstudioai/sim git https://github.com/simstudioai/sim.git
octolytics-dimension-user_id199344406
octolytics-dimension-user_loginsimstudioai
octolytics-dimension-repository_id912559512
octolytics-dimension-repository_nwosimstudioai/sim
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id912559512
octolytics-dimension-repository_network_root_nwosimstudioai/sim
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasecbf66c024bb6d10e6955baa7413c54cf13a201bb
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/simstudioai/sim/pull/6706/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F6706%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F6706%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=simstudioai%2Fsim
Reloadhttps://github.com/simstudioai/sim/pull/6706/files
Reloadhttps://github.com/simstudioai/sim/pull/6706/files
Reloadhttps://github.com/simstudioai/sim/pull/6706/files
simstudioaihttps://github.com/simstudioai
simhttps://github.com/simstudioai/sim
Codehttps://github.com/simstudioai/sim
Issues129 (129)https://github.com/simstudioai/sim/issues
Pull requests197 (197)https://github.com/simstudioai/sim/pulls
Actionshttps://github.com/simstudioai/sim/actions
Projectshttps://github.com/simstudioai/sim/projects
Security and qualityhttps://github.com/simstudioai/sim/security
Insightshttps://github.com/simstudioai/sim/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fsimstudioai%2Fsim%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fsimstudioai%2Fsim%2Fissues%2Fnew%2Fchoose
waleedlatif1https://github.com/waleedlatif1
staginghttps://github.com/simstudioai/sim/tree/staging
fix/serializer-model-vars-and-blockoutputs-logginghttps://github.com/simstudioai/sim/tree/fix/serializer-model-vars-and-blockoutputs-logging
Conversation 8 https://github.com/simstudioai/sim/pull/6706
Commits 2 https://github.com/simstudioai/sim/pull/6706/commits
Checks 30 https://github.com/simstudioai/sim/pull/6706/checks
Files changed https://github.com/simstudioai/sim/pull/6706/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6706/files
fix(logger, blocks): log nested errors and stop spurious model-selection warnings https://github.com/simstudioai/sim/pull/6706/files#top
Show all changes 2 commits https://github.com/simstudioai/sim/pull/6706/files
2fedeb0 fix(logger, blocks): log nested errors and stop spurious model-select… waleedlatif1 Aug 14, 2026 https://github.com/simstudioai/sim/pull/6706/commits/2fedeb05f1e2c4469ff3f3f2e85f784e0624be7a
523a67f fix(blocks): move the fallback rationale into TSDoc waleedlatif1 Aug 14, 2026 https://github.com/simstudioai/sim/pull/6706/commits/523a67fcf4ac727f3d11ef820c35bf4bb1eb402a
Clear filters https://github.com/simstudioai/sim/pull/6706/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6706/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6706/files
agent.ts https://github.com/simstudioai/sim/pull/6706/files#diff-948ddbf542b7729e05d975bec2be626a8c036185eaab10f4a07c87a333554835
evaluator.ts https://github.com/simstudioai/sim/pull/6706/files#diff-18525e7c5082b61ca332655414e3b6ac4f7a2eed3427eb15a17ef57b053e9b4f
router.ts https://github.com/simstudioai/sim/pull/6706/files#diff-2ca728a41ebcdb3fb602d8b5cff800bd40c6b637ab55b82b7357e24810a01773
utils.test.ts https://github.com/simstudioai/sim/pull/6706/files#diff-09e701e41c362d4bf6f52b03c6973f724979b19cac1a6e98301ee8e006f8520d
utils.ts https://github.com/simstudioai/sim/pull/6706/files#diff-00cc78b039ecda659f6de1dd449fed5676eae446e59d79ee378ba5dabd84674a
utils.test.ts https://github.com/simstudioai/sim/pull/6706/files#diff-8eabf1c02c2ea4149f157a0f4345ce7273b3f388cd42a32c660e07f72335025b
index.test.ts https://github.com/simstudioai/sim/pull/6706/files#diff-77afe35db02ed4a3b948b79b41c5de9f96366ffdd050a5a4ac2bec8aaaa9017a
index.ts https://github.com/simstudioai/sim/pull/6706/files#diff-28fa80c3ade4a6f73b01125812c6da6d545508404cea375af71fac932fd5595a
apps/sim/blocks/blocks/agent.tshttps://github.com/simstudioai/sim/pull/6706/files#diff-948ddbf542b7729e05d975bec2be626a8c036185eaab10f4a07c87a333554835
View file https://github.com/simstudioai/sim/blob/523a67fcf4ac727f3d11ef820c35bf4bb1eb402a/apps/sim/blocks/blocks/agent.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6706/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6706/files#diff-948ddbf542b7729e05d975bec2be626a8c036185eaab10f4a07c87a333554835
https://github.com/simstudioai/sim/pull/6706/files#diff-948ddbf542b7729e05d975bec2be626a8c036185eaab10f4a07c87a333554835
https://github.com/simstudioai/sim/pull/6706/files#diff-948ddbf542b7729e05d975bec2be626a8c036185eaab10f4a07c87a333554835
https://github.com/simstudioai/sim/pull/6706/files#diff-948ddbf542b7729e05d975bec2be626a8c036185eaab10f4a07c87a333554835
https://github.com/simstudioai/sim/pull/6706/files#diff-948ddbf542b7729e05d975bec2be626a8c036185eaab10f4a07c87a333554835
apps/sim/blocks/blocks/evaluator.tshttps://github.com/simstudioai/sim/pull/6706/files#diff-18525e7c5082b61ca332655414e3b6ac4f7a2eed3427eb15a17ef57b053e9b4f
View file https://github.com/simstudioai/sim/blob/523a67fcf4ac727f3d11ef820c35bf4bb1eb402a/apps/sim/blocks/blocks/evaluator.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6706/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6706/files#diff-18525e7c5082b61ca332655414e3b6ac4f7a2eed3427eb15a17ef57b053e9b4f
https://github.com/simstudioai/sim/pull/6706/files#diff-18525e7c5082b61ca332655414e3b6ac4f7a2eed3427eb15a17ef57b053e9b4f
https://github.com/simstudioai/sim/pull/6706/files#diff-18525e7c5082b61ca332655414e3b6ac4f7a2eed3427eb15a17ef57b053e9b4f
https://github.com/simstudioai/sim/pull/6706/files#diff-18525e7c5082b61ca332655414e3b6ac4f7a2eed3427eb15a17ef57b053e9b4f
apps/sim/blocks/blocks/router.tshttps://github.com/simstudioai/sim/pull/6706/files#diff-2ca728a41ebcdb3fb602d8b5cff800bd40c6b637ab55b82b7357e24810a01773
View file https://github.com/simstudioai/sim/blob/523a67fcf4ac727f3d11ef820c35bf4bb1eb402a/apps/sim/blocks/blocks/router.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6706/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6706/files#diff-2ca728a41ebcdb3fb602d8b5cff800bd40c6b637ab55b82b7357e24810a01773
https://github.com/simstudioai/sim/pull/6706/files#diff-2ca728a41ebcdb3fb602d8b5cff800bd40c6b637ab55b82b7357e24810a01773
https://github.com/simstudioai/sim/pull/6706/files#diff-2ca728a41ebcdb3fb602d8b5cff800bd40c6b637ab55b82b7357e24810a01773
https://github.com/simstudioai/sim/pull/6706/files#diff-2ca728a41ebcdb3fb602d8b5cff800bd40c6b637ab55b82b7357e24810a01773
https://github.com/simstudioai/sim/pull/6706/files#diff-2ca728a41ebcdb3fb602d8b5cff800bd40c6b637ab55b82b7357e24810a01773
https://github.com/simstudioai/sim/pull/6706/files#diff-2ca728a41ebcdb3fb602d8b5cff800bd40c6b637ab55b82b7357e24810a01773
apps/sim/blocks/utils.test.tshttps://github.com/simstudioai/sim/pull/6706/files#diff-09e701e41c362d4bf6f52b03c6973f724979b19cac1a6e98301ee8e006f8520d
View file https://github.com/simstudioai/sim/blob/523a67fcf4ac727f3d11ef820c35bf4bb1eb402a/apps/sim/blocks/utils.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6706/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6706/files#diff-09e701e41c362d4bf6f52b03c6973f724979b19cac1a6e98301ee8e006f8520d
https://github.com/simstudioai/sim/pull/6706/files#diff-09e701e41c362d4bf6f52b03c6973f724979b19cac1a6e98301ee8e006f8520d
https://github.com/simstudioai/sim/pull/6706/files#diff-09e701e41c362d4bf6f52b03c6973f724979b19cac1a6e98301ee8e006f8520d
apps/sim/blocks/utils.tshttps://github.com/simstudioai/sim/pull/6706/files#diff-00cc78b039ecda659f6de1dd449fed5676eae446e59d79ee378ba5dabd84674a
View file https://github.com/simstudioai/sim/blob/523a67fcf4ac727f3d11ef820c35bf4bb1eb402a/apps/sim/blocks/utils.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6706/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6706/files#diff-00cc78b039ecda659f6de1dd449fed5676eae446e59d79ee378ba5dabd84674a
https://github.com/simstudioai/sim/pull/6706/files#diff-00cc78b039ecda659f6de1dd449fed5676eae446e59d79ee378ba5dabd84674a
https://github.com/simstudioai/sim/pull/6706/files#diff-00cc78b039ecda659f6de1dd449fed5676eae446e59d79ee378ba5dabd84674a
https://github.com/simstudioai/sim/pull/6706/files#diff-00cc78b039ecda659f6de1dd449fed5676eae446e59d79ee378ba5dabd84674a
apps/sim/providers/utils.test.tshttps://github.com/simstudioai/sim/pull/6706/files#diff-8eabf1c02c2ea4149f157a0f4345ce7273b3f388cd42a32c660e07f72335025b
View file https://github.com/simstudioai/sim/blob/523a67fcf4ac727f3d11ef820c35bf4bb1eb402a/apps/sim/providers/utils.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6706/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6706/files#diff-8eabf1c02c2ea4149f157a0f4345ce7273b3f388cd42a32c660e07f72335025b
https://github.com/simstudioai/sim/pull/6706/files#diff-8eabf1c02c2ea4149f157a0f4345ce7273b3f388cd42a32c660e07f72335025b
packages/logger/src/index.test.tshttps://github.com/simstudioai/sim/pull/6706/files#diff-77afe35db02ed4a3b948b79b41c5de9f96366ffdd050a5a4ac2bec8aaaa9017a
View file https://github.com/simstudioai/sim/blob/523a67fcf4ac727f3d11ef820c35bf4bb1eb402a/packages/logger/src/index.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6706/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6706/files#diff-77afe35db02ed4a3b948b79b41c5de9f96366ffdd050a5a4ac2bec8aaaa9017a
https://github.com/simstudioai/sim/pull/6706/files#diff-77afe35db02ed4a3b948b79b41c5de9f96366ffdd050a5a4ac2bec8aaaa9017a
packages/logger/src/index.tshttps://github.com/simstudioai/sim/pull/6706/files#diff-28fa80c3ade4a6f73b01125812c6da6d545508404cea375af71fac932fd5595a
View file https://github.com/simstudioai/sim/blob/523a67fcf4ac727f3d11ef820c35bf4bb1eb402a/packages/logger/src/index.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6706/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6706/files#diff-28fa80c3ade4a6f73b01125812c6da6d545508404cea375af71fac932fd5595a
https://github.com/simstudioai/sim/pull/6706/files#diff-28fa80c3ade4a6f73b01125812c6da6d545508404cea375af71fac932fd5595a
Please reload this pagehttps://github.com/simstudioai/sim/pull/6706/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.