René's URL Explorer Experiment


Title: feat(xai): wire reasoning effort through the Grok adapter by waleedlatif1 · Pull Request #6627 · simstudioai/sim · GitHub

Open Graph Title: feat(xai): wire reasoning effort through the Grok adapter by waleedlatif1 · Pull Request #6627 · simstudioai/sim

X Title: feat(xai): wire reasoning effort through the Grok adapter by waleedlatif1 · Pull Request #6627 · simstudioai/sim

Description: Summary Declare capabilities.reasoningEffort on the four Grok models that actually accept it, with per-model values Forward reasoning_effort from providers/xai/index.ts, so the flag stops being dead for xAI Fix grok-4.5's missing cachedInput ($0.30/M) and add a provider TSDoc header Before this, xAI declared no reasoningEffort capability and the adapter only ever sent temperature and max_completion_tokens. The Agent block's effort dropdown never appeared for Grok, and any effort value was silently dropped. Values are live-verified, not doc-derived I probed every live Grok model × every effort value against POST /v1/chat/completions with the staging hosted key. xAI's docs are wrong in three places: Model Docs say API actually accepts grok-4.6 low, medium, high, xhigh ✅ same grok-4.5 low, medium, high also xhigh grok-4.3 not listed as supporting it low, medium, high, xhigh, and none grok-4.20-multi-agent-0309 low, medium, high, xhigh ✅ plus none grok-4.20-0309-reasoning implied supported rejects it: does not support parameter reasoningEffort grok-4.20-0309-non-reasoning — rejects grok-build-0.1 — rejects none is a real vendor value on the two models that list it (reasoning_tokens: 0), and is rejected by 4.5/4.6 — hence the per-model lists rather than one shared array. auto is rejected by every model (Invalid reasoning effort), which is why Sim's auto sentinel must never be forwarded. Also confirmed live that reasoning_effort co-exists with everything the adapter sends: tools + tool_choice auto/forced/none, response_format: json_schema, temperature, and streaming. And that xAI streams raw reasoning_content deltas, which is what the generated docs table now claims. Placement The guard sets reasoning_effort on basePayload, which every derived payload spreads — so it survives the tool loop, the response-format pass, and the streaming request. The new test asserts exactly that on all four paths; I verified all four fail when the guard is removed. Forwarding an undeclared value is intentional sanitizeRequest drops reasoningEffort when a catalogued model lacks the capability, but does not check the value against that model's values list. That is a deliberate, documented policy, not a gap — providers/index.test.ts pins it: an unrecognized level is forwarded rather than dropped: the provider answers with an error naming the values it accepts, instead of Sim silently substituting the model default and quietly corrupting a sweep. This PR is itself evidence for that policy: xAI's docs omit xhigh for grok-4.5 and don't list grok-4.3 as supporting the parameter at all, yet the API accepts both. A stricter sanitizer would have silently discarded working values. The practical consequence is that switching a block from grok-4.3 (which takes none) to grok-4.6 (which rejects it) leaves the stored none in place — dependsOn refetches the dropdown options but does not clear the value — and xAI answers with a clear 400 naming the accepted values. That is the intended behavior. Type of Change New feature Testing New providers/xai/index.test.ts (5 tests) covering forward-when-set, omit-on-auto, omit-when-unset, and persistence across the tool loop / response-format / streaming payloads. Full provider suite green (1483 tests), plus lint, type-check, and agent-stream-docs:check. 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 Declare capabilities.reasoningEffort on the four Grok models that actually accept it, with per-model values Forward reasoning_effort from providers/xai/index.ts, so the flag stops being de...

X Description: Summary Declare capabilities.reasoningEffort on the four Grok models that actually accept it, with per-model values Forward reasoning_effort from providers/xai/index.ts, so the flag stops being de...

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

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:979440e7-c128-3abc-a10d-237c00139195
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id818E:34DD79:33D2A5:492290:6AFB56E1
html-safe-nonce3bcad199fc65d7394136c25377f70e77da4f9f89b67510bc5c2cc069ec2db17a
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MThFOjM0REQ3OTozM0QyQTU6NDkyMjkwOjZBRkI1NkUxIiwidmlzaXRvcl9pZCI6IjgyNTQxMDM0MTcyMjQxMjQxMjkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac1a07f6612603154db8257e8c14201ba901db26b87b2cf45bdf5f43df143ae8a8
hovercard-subject-tagpull_request:4264247015
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/6627/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 Declare capabilities.reasoningEffort on the four Grok models that actually accept it, with per-model values Forward reasoning_effort from providers/xai/index.ts, so the flag stops being de...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneea33d13c96d0ff66bd8fa906b193d2213536b78cb06b0c50a4632c58b1418f94
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
release59ef97164c52cf59bd10558ddec9c4f482763988
ui-targetcanary-2
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/simstudioai/sim/pull/6627/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F6627%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%2F6627%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/6627/files
Reloadhttps://github.com/simstudioai/sim/pull/6627/files
Reloadhttps://github.com/simstudioai/sim/pull/6627/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
feat/xai-reasoning-efforthttps://github.com/simstudioai/sim/tree/feat/xai-reasoning-effort
Conversation 7 https://github.com/simstudioai/sim/pull/6627
Commits 3 https://github.com/simstudioai/sim/pull/6627/commits
Checks 31 https://github.com/simstudioai/sim/pull/6627/checks
Files changed https://github.com/simstudioai/sim/pull/6627/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6627/files
feat(xai): wire reasoning effort through the Grok adapter https://github.com/simstudioai/sim/pull/6627/files#top
Show all changes 3 commits https://github.com/simstudioai/sim/pull/6627/files
2cf0072 feat(xai): wire reasoning effort through the Grok adapter waleedlatif1 Aug 12, 2026 https://github.com/simstudioai/sim/pull/6627/commits/2cf00729ba8b7ee099e072584a4b4d59df086cad
469b769 test(xai): type the provider test helper instead of casting to any waleedlatif1 Aug 12, 2026 https://github.com/simstudioai/sim/pull/6627/commits/469b7699bfd66844d0ee9dc5079ada526ed70f9f
0d5dd61 fix(agent): correct reasoning-effort copy that still claimed GPT-5 only waleedlatif1 Aug 12, 2026 https://github.com/simstudioai/sim/pull/6627/commits/0d5dd6164fd7b04af8fc74d288214c5db33879de
Clear filters https://github.com/simstudioai/sim/pull/6627/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6627/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6627/files
agent.mdx https://github.com/simstudioai/sim/pull/6627/files#diff-6c0af7ec8598191f85ca1c99c6bbb392ebea5ab35537826a35df3262f58419e1
agent.ts https://github.com/simstudioai/sim/pull/6627/files#diff-948ddbf542b7729e05d975bec2be626a8c036185eaab10f4a07c87a333554835
index.test.ts https://github.com/simstudioai/sim/pull/6627/files#diff-457f24777e278f328941b561bacfb240afbf5d793309275f6074dbcfd3772dc5
models.ts https://github.com/simstudioai/sim/pull/6627/files#diff-352174d7cadfdcaf759836ee5b99d67c4cc92aa73065e6983e547fe5c55299b3
index.test.ts https://github.com/simstudioai/sim/pull/6627/files#diff-f84b5c882b3ac289fa4c7b36c13a1ff9c52738439d44600669c119bc75ce7c9a
index.ts https://github.com/simstudioai/sim/pull/6627/files#diff-6a25345dd21f13435ed78bfd600452bd2118638cabe5e77266bc3dc22c9d8b16
apps/docs/content/docs/en/workflows/blocks/agent.mdxhttps://github.com/simstudioai/sim/pull/6627/files#diff-6c0af7ec8598191f85ca1c99c6bbb392ebea5ab35537826a35df3262f58419e1
View file https://github.com/simstudioai/sim/blob/0d5dd6164fd7b04af8fc74d288214c5db33879de/apps/docs/content/docs/en/workflows/blocks/agent.mdx
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6627/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6627/files#diff-6c0af7ec8598191f85ca1c99c6bbb392ebea5ab35537826a35df3262f58419e1
https://github.com/simstudioai/sim/pull/6627/files#diff-6c0af7ec8598191f85ca1c99c6bbb392ebea5ab35537826a35df3262f58419e1
https://github.com/simstudioai/sim/pull/6627/files#diff-6c0af7ec8598191f85ca1c99c6bbb392ebea5ab35537826a35df3262f58419e1
https://github.com/simstudioai/sim/pull/6627/files#diff-6c0af7ec8598191f85ca1c99c6bbb392ebea5ab35537826a35df3262f58419e1
apps/sim/blocks/blocks/agent.tshttps://github.com/simstudioai/sim/pull/6627/files#diff-948ddbf542b7729e05d975bec2be626a8c036185eaab10f4a07c87a333554835
View file https://github.com/simstudioai/sim/blob/0d5dd6164fd7b04af8fc74d288214c5db33879de/apps/sim/blocks/blocks/agent.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6627/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6627/files#diff-948ddbf542b7729e05d975bec2be626a8c036185eaab10f4a07c87a333554835
https://github.com/simstudioai/sim/pull/6627/files#diff-948ddbf542b7729e05d975bec2be626a8c036185eaab10f4a07c87a333554835
apps/sim/providers/index.test.tshttps://github.com/simstudioai/sim/pull/6627/files#diff-457f24777e278f328941b561bacfb240afbf5d793309275f6074dbcfd3772dc5
View file https://github.com/simstudioai/sim/blob/0d5dd6164fd7b04af8fc74d288214c5db33879de/apps/sim/providers/index.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6627/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6627/files#diff-457f24777e278f328941b561bacfb240afbf5d793309275f6074dbcfd3772dc5
https://github.com/simstudioai/sim/pull/6627/files#diff-457f24777e278f328941b561bacfb240afbf5d793309275f6074dbcfd3772dc5
apps/sim/providers/models.tshttps://github.com/simstudioai/sim/pull/6627/files#diff-352174d7cadfdcaf759836ee5b99d67c4cc92aa73065e6983e547fe5c55299b3
View file https://github.com/simstudioai/sim/blob/0d5dd6164fd7b04af8fc74d288214c5db33879de/apps/sim/providers/models.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6627/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6627/files#diff-352174d7cadfdcaf759836ee5b99d67c4cc92aa73065e6983e547fe5c55299b3
https://github.com/simstudioai/sim/pull/6627/files#diff-352174d7cadfdcaf759836ee5b99d67c4cc92aa73065e6983e547fe5c55299b3
https://github.com/simstudioai/sim/pull/6627/files#diff-352174d7cadfdcaf759836ee5b99d67c4cc92aa73065e6983e547fe5c55299b3
https://github.com/simstudioai/sim/pull/6627/files#diff-352174d7cadfdcaf759836ee5b99d67c4cc92aa73065e6983e547fe5c55299b3
https://github.com/simstudioai/sim/pull/6627/files#diff-352174d7cadfdcaf759836ee5b99d67c4cc92aa73065e6983e547fe5c55299b3
https://github.com/simstudioai/sim/pull/6627/files#diff-352174d7cadfdcaf759836ee5b99d67c4cc92aa73065e6983e547fe5c55299b3
apps/sim/providers/xai/index.test.tshttps://github.com/simstudioai/sim/pull/6627/files#diff-f84b5c882b3ac289fa4c7b36c13a1ff9c52738439d44600669c119bc75ce7c9a
View file https://github.com/simstudioai/sim/blob/0d5dd6164fd7b04af8fc74d288214c5db33879de/apps/sim/providers/xai/index.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6627/{{ revealButtonHref }}
Please reload this pagehttps://github.com/simstudioai/sim/pull/6627/files
apps/sim/providers/xai/index.tshttps://github.com/simstudioai/sim/pull/6627/files#diff-6a25345dd21f13435ed78bfd600452bd2118638cabe5e77266bc3dc22c9d8b16
View file https://github.com/simstudioai/sim/blob/0d5dd6164fd7b04af8fc74d288214c5db33879de/apps/sim/providers/xai/index.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6627/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6627/files#diff-6a25345dd21f13435ed78bfd600452bd2118638cabe5e77266bc3dc22c9d8b16
https://github.com/simstudioai/sim/pull/6627/files#diff-6a25345dd21f13435ed78bfd600452bd2118638cabe5e77266bc3dc22c9d8b16
https://github.com/simstudioai/sim/pull/6627/files#diff-6a25345dd21f13435ed78bfd600452bd2118638cabe5e77266bc3dc22c9d8b16
https://github.com/simstudioai/sim/pull/6627/files#diff-6a25345dd21f13435ed78bfd600452bd2118638cabe5e77266bc3dc22c9d8b16
https://github.com/simstudioai/sim/pull/6627/files#diff-6a25345dd21f13435ed78bfd600452bd2118638cabe5e77266bc3dc22c9d8b16
https://github.com/simstudioai/sim/pull/6627/files#diff-6a25345dd21f13435ed78bfd600452bd2118638cabe5e77266bc3dc22c9d8b16
Please reload this pagehttps://github.com/simstudioai/sim/pull/6627/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.