Repository navigation
fix(cloudflare): sync reasoning controls from model schemas - #5563
Closed
opencode-agent[bot] wants to merge 2 commits into
Closed
opencode-agent[bot] wants to merge 2 commits into
opencode-agent[bot] wants to merge 2 commits into
Conversation
Contributor
|
No actionable findings. |
Contributor
Action items
|
This was referenced Sep 23, 2026
Contributor
|
Got an MR to fix this, @rekram1-node: #7920 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fetch each Cloudflare Workers AI model's input schema and sync the reasoning controls it declares.
The
format=openroutercatalog advertises reasoning as a feature but currently contains no per-modelreasoningobjects. Simply retaining the shared translator's computed options is not enough: the sync needs the separate model-schema endpoint to discover the controls.reasoning_effort/reasoning.effortenums and thechat_template_kwargs.enable_thinkingboolean through request-schemaanyOf/oneOfalternatives.No catalog TOMLs or credentials are included in this change. Schema declarations describe the provider's advertised API surface; this does not claim inference-tested behavioral differences between effort levels.
Live verification
Read-only API checks on 2026-08-26:
reasoningobjects.reasoning_effort = low|medium|highandchat_template_kwargs.enable_thinking = true|false. GPT-OSS declares nestedreasoning.effortwithout that toggle.Sources: Cloudflare model search and model-schema endpoint.
Validation
bun test packages/core/test/cloudflare-workers-ai-sync.test.ts: 24 pass, including fetch failures, schema extraction, curated fallback, serialized header preservation, and repeat-sync idempotence.bun test packages/core/test/sync.test.ts --test-name-pattern 'OpenRouter|reasoning options|reasoning efforts|reasoning metadata|reasoning controls|header': 32 pass.bun models:sync cloudflare-workers-ai --dry-run --no-issues: passes against the live API.bun validateandgit diff --check: pass.DeepInfra preserves live modalities for new base models; this was reproduced without the Cloudflare fix and is outside this change.SyncedMetadata.reasoning_optionsaccess. No diagnostics in the changed Cloudflare provider or its tests.Requested by: @rekram1-node (Aiden via Slack)