Repository navigation
fix(provider): harden GPT-OSS Harmony requests - #703
Merged
Merged
Conversation
Preserve every system instruction and reject ambiguous tool histories while serving high reasoning effort as medium to avoid upstream timeouts. Co-authored-by: Cursor <cursoragent@cursor.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Gajesh2007
had a problem deploying
to
benchmarks
August 25, 2026 01:40 — with
GitHub Actions
Failure
0xkydo
approved these changes
Aug 25, 2026
This was referenced Nov 8, 2026
Merged
jonathan308
added a commit
that referenced
this pull request
Nov 8, 2026
…ony level, as the coordinator plans them B-J2-1's last two families. #1909 kept Gemma 4 and GPT-OSS on the prompts they rendered before, because the coordinator's prompt sidecar planned those. The sidecar in darkbloom-platform#721 now plans them like the other families, from a copy of these tables, so the provider renders the same: - Gemma 4 (gemma4, gemma4_text, gemma4_vision) and DiffusionGemma take an effort as their thinking switch (ReasoningEffortPolicy .effortSetsThinkingSwitch, ReasoningEffort.oneDepthThinking): on for every effort but none, which turns it off. An explicit switch wins, and no effort keeps the template's default. - GPT-OSS renders each effort at the nearest Harmony level, a new table ReasoningEffort.harmonyLevel (none, minimal and low as low; medium; high, xhigh and max as high), thinking or not (templateEffort). GPTOSSHarmonyTemplateFix.effectiveReasoningEffort, the high->medium of #703, goes: the coordinator keeps OpenRouter's traffic at medium, service accounts only, so a direct caller's high renders high. ReasoningEffort.swift's notes name the coordinator's copies and the agreement test. Two tests that asserted the old GPT-OSS medium (GPTOSSHarmonyTemplateFixesTests, BenchmarkProductionInputTests) now assert high. The fixtures are darkbloom-platform 92a208a7da5c1020c5a19ac4c29ba302d34b0838, byte for byte: production_vectors.json 0bba2b663a1bfe112a08230ac15f7e57d9dfdbb0302e26c0e4884cc2d7ee05f9 reasoning_effort_vectors.json 6ca08c3e1db6d5fdd906cf76b818d6d60d212fa19cfd3bea10bcbafecec16aa4 native_reasoning_vectors.json c4d496f6a6b7e4fdcaa9d59debf8f40c16a1cc1d86e0e76f8aadb916922ea9d2 Tests: the red commit (7079a37) failed in CI exactly as planned. Shard 1 had 36 issues: the agreement test on 35 cases (16 Gemma 4, 19 GPT-OSS) and the native vector. Its prompt-parity gate (verify-prompt-parity.sh) failed on the three Gemma 4 reasoning_effort cases. Shard 2 had 75 issues: Gemma 4 one-depth 36, GPT-OSS levels 20, GPT-OSS template context 14, table rule 5. Locally, with Xcode 27.2 on CPU only, these pass: CachePromptParityTests, ReasoningEffortValuesTests, templateContext*, GPTOSSHarmonyTemplateFixesTests, BenchmarkProductionInputTests, DiffusionGemmaReasoningControlTests, PromptDateRenderingTests, Qwen4ReasoningEffortValidationTests, InboundDecodeTests, NemotronSuperPromptContractTests and GLM5NextPromptPolicyTests. So does ProductionPromptParityTests (PROMPT_PARITY_REQUIRED=1, the manifests' artifacts): Swift and the platform's Rust render every case of the seven production models token for token. EngineV2VisionRoutingTests needs a Metal device, so it is left to CI. Docs: inference.md (the family table; the pending marker goes) and test.md (the agreement fixture and its generator), plus a changelog fragment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jonathan308
added a commit
that referenced
this pull request
Nov 9, 2026
…s live, in that order #1916's review, condition C1. This PR moves #703's high->medium rule out of the provider: GPT-OSS now renders high for high, xhigh and max. OpenRouter's GPT-OSS stays at medium only through darkbloom-platform#721's service cap (ApplyServiceEffortCap). A Mac that runs this change before the cap is live renders OpenRouter's high as high, which #703 capped to avoid upstream timeouts. Merging to dev is safe; releasing isn't, until the cap ships. The changelog fragment and inference.md now say so, with the order, each step on the owner's go: 1. tag a provider release with this change, without publishing it to auto-update; 2. snapshot that tag into darkbloom-platform#721; 3. deploy #721; 4. then let Macs update. The GPT-OSS row of the effort table no longer says the coordinator caps OpenRouter's traffic as if it already did: it names #721's cap and the condition. Also the review's N2: the production prompt vectors carry one effort case per model, reasoning_effort "medium" (checked against the fixture: 7 models, 22 cases each, one with an effort). They pin Gemma 4's switch; GPT-OSS's levels are bound by the agreement fixture. inference.md said the vectors carry both. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch had an error being deployed
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
reasoning_effort: highasmediumto avoid the observed 300-second upstream timeout; other models and effort values remain unchangedBefore
flowchart LR A[OpenAI chat request] --> B[ProviderLoop decode] B --> C[Generic tool-history validation] C --> D[GPTOSSHarmonyTemplateFix] D --> E[Harmony Jinja template] E --> F[Only first system turn retained] B --> G[reasoning_effort high passed through] G --> E E --> H[High-effort runaway can exceed 300s]After
flowchart LR A[OpenAI chat request] --> B[ProviderLoop decode] B --> C[ProviderPromptContractPipeline] C --> D[LeadingSystemMessageNormalizer] D --> E[GPT-OSS tool-history normalization] E --> F[Generic validation] F --> G[Harmony Jinja template] G --> H[All text system instructions retained] C --> I{GPT-OSS and high?} I -->|yes| J[Render as medium] I -->|no| K[Preserve requested effort] J --> G K --> GTest plan
swift test— 2,160 tests passedDARKBLOOM_LIVE_MLX_TESTS=1 swift test --filter ReasoningEffortLiveTests— real GPT-OSS template and generation passedMade with Cursor
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.