fix(translator): pass service_tier through OpenAI→Responses conversion#2662
Open
raflyazf wants to merge 1 commit into
Open
fix(translator): pass service_tier through OpenAI→Responses conversion#2662raflyazf wants to merge 1 commit into
raflyazf wants to merge 1 commit into
Conversation
The openaiToOpenAIResponsesRequest translator was not forwarding service_tier from Chat Completions to Responses API format, even though the Codex executor already handles it (fast→priority mapping, non-priority stripping). This meant service_tier: "priority" sent via 9router was silently dropped, giving identical performance to default tier. Benchmark on direct Codex API shows priority tier delivers ~35-38% TPS improvement over default: - gpt-5.6-sol: 45.6 → 61.8 TPS (+35%) - gpt-5.6-terra: 53.3 → 73.6 TPS (+38%) Fix: one-line passthrough in the translator's field forwarding block.
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.
Problem
The
openaiToOpenAIResponsesRequesttranslator was not forwardingservice_tierfrom Chat Completions to Responses API format, even though the Codex executor already handles it (line 475-476 inexecutors/codex.js):This meant
service_tier: "priority"sent via 9router was silently dropped during translation, giving identical performance todefaulttier.Benchmark
Direct probe against
https://chatgpt.com/backend-api/codex/responses(bypassing 9router) confirms priority tier delivers real speedup:gpt-5.6-solgpt-5.6-solgpt-5.6-terragpt-5.6-terraVia 9router (before fix): no difference between tiers (field dropped).
Via 9router (after fix): priority shows the same ~35-38% TPS improvement.
Fix
One-line passthrough in the translator's field forwarding block:
if (body.reasoning !== undefined) result.reasoning = body.reasoning; if (body.reasoning_effort !== undefined) result.reasoning = { effort: body.reasoning_effort, summary: "auto" }; + if (body.service_tier !== undefined) result.service_tier = body.service_tier;The executor's existing allowlist (
RESPONSES_API_ALLOWLIST) already includesservice_tier, so no additional changes needed there.