Responses ingress ignores body prompt_cache_key when no session_id header is sent, so non-Codex clients (OMP) get near-zero cache reuse on ChatGPT-backed models
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
- 技術スタック
- typescript
調査の方向性
Start with conversationIdFromResponsesRequest in src/server/responses/request-prepare.ts and compare how src/grok/session-identity.ts promotes a request identifier. Trace how the Responses ingress maps conversation identity to the upstream session_id; done means a request with prompt_cache_key and no session header gets the intended affinity. Issue #9145 already has an open pull request, so check its status before starting.
索引モデルが issue の本文から書いたものです。
説明
Client or integration
Other — Oh My Pi (OMP) 19.1.1 calling /v1/responses on the loopback endpoint (api: openai-responses)
Area
Proxy and routing
Summary
OMP sends a stable per-session prompt_cache_key in the Responses body but no session_id / session-id / thread-id header. opencodex resolves the conversation identity on the Responses ingress from headers only (conversationIdFromResponsesRequest in src/server/responses/request-prepare.ts), so every OMP request is logged with affinity: "unbound", affinityReason: "no_conversation", and the ChatGPT Codex backend does not reuse the warmed prefix.
#6520 fixed the same symptom for Chat Completions ingress by promoting x-session-id (#6880). The Responses ingress has no equivalent fallback for a caller that only sends prompt_cache_key.
Expected: when no session header is present, use the body prompt_cache_key as the upstream session_id (the same way src/grok/session-identity.ts promotes x-grok-conv-id), or offer an opt-in for it.
Reproduction
- Build one ~73K-token Responses body for
gpt-6.2-solwith"prompt_cache_key": "capt-test-key-1",store: false,reasoning.effort: "low". - POST it to
http://127.0.0.1:10100/v1/responsesthree times without a session header, then three times withsession_id: <fixed uuid>.
| Header | input_tokens_details.cached_tokens (1st, 2nd, 3rd) |
|---|---|
no session_id |
0, 0, 0 |
session_id set |
0, 72832, 72832 |
Same account, same model, same byte-identical body; only the header differs.
Version
2.100.8
Operating system
macOS (Darwin 27.2.0, arm64)
Provider and model
OpenAI (ChatGPT OAuth) — gpt-6.2-sol, gpt-6.2-astra
Logs or error output
From usage.jsonl, OMP /v1/responses traffic on GPT models (requests with more than 20K input tokens):
| client / affinityReason | requests | cached share |
|---|---|---|
unknown / no_conversation (OMP, no session header) |
342 | 32.6% |
unknown / request_owned (conversation id present) |
161 | 80.1% |
codex_cli / request_owned |
32 | 89.0% |
Within one OMP session, the cached count jumps between 0, ~17,920, and partial values from turn to turn while the prefix only grows.
Headers OMP sends (captured): accept, accept-encoding, connection, content-length, content-type, host, user-agent: omp/19.1.1. Body keys: model, input, stream, prompt_cache_key, store, max_output_tokens, tools, include, reasoning.
Checks
- I searched existing issues and documentation.
- I removed secrets, tokens, account details, request credentials, and personal data.
- 主要言語
- TypeScript
- スター
- 16.9k
- フォーク
- 1.3k
- 平均マージ
- 1日 4時間
- マージ済み PR(30日)
- 814
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
lidge-jun/opencodex のほかの issue
-
bug gui platform
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
lidge-jun/opencodex#9172 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[Feature]: Include provider, model and account label in the `upstream failure` service.log line対応中かも @EnesKartal が 4 日前に担当しました。 オープンenhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
lidge-jun/opencodex#9057 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[Provider] antigravity-acp catalog omits gemini-4-hydrogen and gemini-4-neon that agy acp offers対応中かも @sedoll が 6 日前に担当しました。 オープンcatalog provider provider-compatibility
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
lidge-jun/opencodex#9037 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug cli
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
lidge-jun/opencodex#9171 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
account-pool enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
lidge-jun/opencodex の issue をすべて見る
似ている issue
-
manually bump balena-preload to ^19.0.6対応中かも @shaunmulligan が今日担当しました。 オープン
難易度 1/5 1〜3時間 初心者へのやさしさ 66/100
balena-io/balena-cli#3200 ·
メンテナーはふだん 1 日以内に返信
-
`MaterializedChatMessage._text` is quadratic in the number of text chunks (`+=` followed by `endsWith`), driving the extension host to heap OOM対応中かも @olegius88 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
microsoft/vscode-prompt-tsx#205 ·
-
triage
難易度 1/5 1時間未満 初心者へのやさしさ 64/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
melgarafael/DeskcommCRM#5340 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
ehmpathy/rhachet-roles-ehmpathy#1529 ·
メンテナーはふだん 1 日以内に返信