Skip to content

fix(translator): pass service_tier through OpenAI→Responses conversion#2662

Open
raflyazf wants to merge 1 commit into
decolua:masterfrom
raflyazf:fix/service-tier-passthrough
Open

fix(translator): pass service_tier through OpenAI→Responses conversion#2662
raflyazf wants to merge 1 commit into
decolua:masterfrom
raflyazf:fix/service-tier-passthrough

Conversation

@raflyazf

Copy link
Copy Markdown
Contributor

Problem

The openaiToOpenAIResponsesRequest translator was not forwarding service_tier from Chat Completions to Responses API format, even though the Codex executor already handles it (line 475-476 in executors/codex.js):

if (body.service_tier === "fast") body.service_tier = "priority";
if (body.service_tier && body.service_tier !== "priority") delete body.service_tier;

This meant service_tier: "priority" sent via 9router was silently dropped during translation, giving identical performance to default tier.

Benchmark

Direct probe against https://chatgpt.com/backend-api/codex/responses (bypassing 9router) confirms priority tier delivers real speedup:

Model Tier TPS p50 Delta
gpt-5.6-sol default 45.6
gpt-5.6-sol priority 61.8 +35.6%
gpt-5.6-terra default 53.3
gpt-5.6-terra priority 73.6 +37.9%

Via 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 includes service_tier, so no additional changes needed there.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant