Skip to content
Merged
5 changes: 5 additions & 0 deletions docs-site/src/content/docs/fr/guides/pi.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ d’exportation de la variable d’environnement et le nombre de modèles dotés
"baseUrl": "http://127.0.0.1:10100/v1",
"api": "openai-completions",
"apiKey": "$OPENCODEX_API_KEY",
"compat": {
"sendSessionAffinityHeaders": true
},
"models": [
{
"id": "anthropic/claude-opus-5",
Expand All @@ -41,6 +44,8 @@ d’exportation de la variable d’environnement et le nombre de modèles dotés
}
```

Les fournisseurs Pi générés activent `compat.sendSessionAffinityHeaders`. Conservez ce réglage lors de la fusion ou de la modification manuelle du fournisseur : Pi transmet un identifiant de session stable, dont OpenCodex dérive l’affinité pour la destination canonique OpenCode Go. Pi peut omettre cet identifiant lorsque `cacheRetention` vaut `none`.

Les identifiants de modèle sont les sélecteurs canoniques du proxy : les modèles routés apparaissent donc sous la forme `provider/model`
(`anthropic/claude-opus-5`) et les slugs natifs OpenAI restent sans préfixe (`gpt-5.6-sol`). Le `name`
suffixe — `(anthropic)`, `(native)`, `(routed)` — permet de distinguer, dans le sélecteur de Pi, deux modèles de même nom
Expand Down
5 changes: 5 additions & 0 deletions docs-site/src/content/docs/guides/pi.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ export line, and how many models carry authoritative context limits.
"baseUrl": "http://127.0.0.1:10100/v1",
"api": "openai-completions",
"apiKey": "$OPENCODEX_API_KEY",
"compat": {
"sendSessionAffinityHeaders": true
},
"models": [
{
"id": "anthropic/claude-opus-5",
Expand All @@ -41,6 +44,8 @@ export line, and how many models carry authoritative context limits.
}
```

Generated Pi providers enable `compat.sendSessionAffinityHeaders`. Keep this flag when merging or manually editing the provider: Pi supplies a stable session identity and OpenCodex derives canonical OpenCode Go affinity from it. Pi may omit the identity when `cacheRetention` is `none`.

Model ids are the proxy's canonical selectors, so routed models appear as `provider/model`
(`anthropic/claude-opus-5`) and native OpenAI slugs stay unprefixed (`gpt-5.6-sol`). The `name`
suffix — `(anthropic)`, `(native)`, `(routed)` — is what makes two same-named models from
Expand Down
5 changes: 5 additions & 0 deletions docs-site/src/content/docs/ja/guides/pi.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ ocx export --client pi
"baseUrl": "http://127.0.0.1:10100/v1",
"api": "openai-completions",
"apiKey": "$OPENCODEX_API_KEY",
"compat": {
"sendSessionAffinityHeaders": true
},
"models": [
{
"id": "anthropic/claude-opus-5",
Expand All @@ -37,6 +40,8 @@ ocx export --client pi
}
```

生成される Pi プロバイダーでは `compat.sendSessionAffinityHeaders` が有効です。設定をマージしたり手動で編集したりする際も、このフラグを保持してください。Pi が送る安定したセッション識別子から、OpenCodex が正規の OpenCode Go 接続先用の affinity を生成します。`cacheRetention` が `none` の場合、Pi は識別子を送信しないことがあります。

モデル ID はプロキシの正規セレクターであるため、ルーティングされたモデルは `provider/model` (`anthropic/claude-opus-5`) として表示され、ネイティブ OpenAI スラグはプレフィックスなし (`gpt-5.6-sol`) のままになります。 `name` サフィックス (`(anthropic)`、`(native)`、`(routed)`) により、異なるアップストリームの 2 つの同じ名前のモデルが Pi のピッカーで区別できるようになります。

## どこへ行くのか
Expand Down
5 changes: 5 additions & 0 deletions docs-site/src/content/docs/ja/reference/proxy-formats.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,11 @@ WebSocket が無効になっている場合、アップグレード試行では

これらのエンドポイントは、Claude Code および互換性のあるクライアントによって使用される Anthropic Messages 言語を話します。ほとんどのリクエストはレスポンスに変換され、通常どおりルーティングされてから、Anthropic JSON または Anthropic SSE に変換されます。

変換される Messages リクエストでは、推論の再送もリクエスト共通の変換バジェットを使います。
この制限にはエンコード・デコード時のコピー分も含まれます。超過時は
`translation_buffer_limit` を伴う HTTP 413 を返し、署名や不透明な推論データを切り詰めません。
ネイティブ Anthropic パススルーには、別の本文サイズ制限が適用されます。

ネイティブ Anthropic パススルーは、次のすべてが当てはまる場合にのみ適格です。

- ネイティブ パススルーはクロード コード設定で無効になっていません。
Expand Down
5 changes: 5 additions & 0 deletions docs-site/src/content/docs/ko/guides/pi.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ ocx export --client pi
"baseUrl": "http://127.0.0.1:10100/v1",
"api": "openai-completions",
"apiKey": "$OPENCODEX_API_KEY",
"compat": {
"sendSessionAffinityHeaders": true
},
"models": [
{
"id": "anthropic/claude-opus-5",
Expand All @@ -41,6 +44,8 @@ ocx export --client pi
}
```

생성된 Pi provider에는 `compat.sendSessionAffinityHeaders`가 활성화됩니다. provider를 병합하거나 직접 수정할 때 이 설정을 유지하세요. Pi가 안정적인 세션 식별자를 보내면 OpenCodex가 이를 바탕으로 정규 OpenCode Go 대상의 affinity를 계산합니다. `cacheRetention`이 `none`이면 Pi가 식별자를 보내지 않을 수 있습니다.

모델 id는 프록시의 정규 선택자이므로, 라우팅된 모델은 `provider/model`
(`anthropic/claude-opus-5`) 형태로 나타나고, 네이티브 OpenAI slug는 접두사 없이
(`gpt-5.6-sol`) 유지됩니다. `name` 접미사인 `(anthropic)`, `(native)`, `(routed)`는
Expand Down
5 changes: 5 additions & 0 deletions docs-site/src/content/docs/ko/reference/proxy-formats.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,11 @@ SSE 객체, choice delta, `finish_reason`이 있는 종료 choice, `data: [DONE]
이 엔드포인트는 Claude Code와 호환 클라이언트가 사용하는 Anthropic Messages 방언을 말합니다. 대부분의 요청은
Responses로 변환되어 일반적으로 라우팅된 뒤, Anthropic JSON 또는 Anthropic SSE로 다시 변환됩니다.

변환되는 Messages 요청의 reasoning 재전송은 요청 전체의 번역 예산을 공유합니다. 이 예산에는
인코딩·디코딩 과정에서 생기는 복사본도 포함됩니다. 한도를 초과하면 `translation_buffer_limit`과
HTTP 413을 반환하며, 한도에 맞추려고 서명이나 불투명 reasoning 데이터를 자르지 않습니다.
네이티브 Anthropic passthrough에는 별도의 본문 크기 제한이 적용됩니다.

네이티브 Anthropic passthrough는 다음이 모두 참일 때만 적용됩니다.

- Claude Code 설정에서 native passthrough가 비활성화되어 있지 않습니다.
Expand Down
4 changes: 4 additions & 0 deletions docs-site/src/content/docs/reference/adapters.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,10 @@ header and does not guarantee a provider cache hit.
**Auth:** `key` (`x-api-key` by default, or `Authorization: Bearer` with `apiKeyTransport: "bearer"`) or `oauth` (Bearer + `anthropic-beta`, for Claude Pro/Max).

- Converts messages to Anthropic content blocks (text, base64 image, `tool_use`, `thinking`).
- Translated Anthropic Messages reasoning replay shares the request translation budget, including
encoding/decoding copy overhead. Requests exceeding it return HTTP 413 with
`translation_buffer_limit`; signatures and opaque reasoning data are never truncated to fit.
Native Anthropic passthrough uses its separate body-size contract.
- **Extended thinking math:** Anthropic requires `max_tokens > thinking.budget_tokens`. The adapter
maps reasoning effort to a budget (minimal 1024 … max 32000), then computes a safe `max_tokens` with
output headroom, and **drops `temperature`/`top_p`** when thinking is enabled (Anthropic forbids
Expand Down
6 changes: 6 additions & 0 deletions docs-site/src/content/docs/reference/proxy-formats.md
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,12 @@ These endpoints speak the Anthropic Messages dialect used by Claude Code and com
Most requests are translated to Responses, routed normally, then translated back to Anthropic JSON
or Anthropic SSE.

On translated Messages requests, reasoning replay shares the request's translation budget.
Envelope admission includes encoding/decoding copy overhead, not just the original signature
length. Requests exceeding this budget return HTTP 413 with `translation_buffer_limit`;
signatures and opaque reasoning data are never truncated to make a request fit. Native
Anthropic passthrough retains its separate body-size contract.

Base64 and URL image sources are translated in user messages and nested tool results. File-backed
images (`source.type: "file"`) require native Anthropic passthrough; translated routes return a
fixed HTTP 400 error asking for base64 or URL input. OpenCodex does not resolve another provider's
Expand Down
5 changes: 5 additions & 0 deletions docs-site/src/content/docs/ru/guides/pi.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ ocx export --client pi
"baseUrl": "http://127.0.0.1:10100/v1",
"api": "openai-completions",
"apiKey": "$OPENCODEX_API_KEY",
"compat": {
"sendSessionAffinityHeaders": true
},
"models": [
{
"id": "anthropic/claude-opus-5",
Expand All @@ -41,6 +44,8 @@ ocx export --client pi
}
```

В создаваемой конфигурации Pi включён `compat.sendSessionAffinityHeaders`. Сохраняйте этот флаг при объединении или ручном редактировании провайдера: Pi передаёт стабильный идентификатор сессии, из которого OpenCodex формирует affinity для канонического OpenCode Go. При `cacheRetention: none` Pi может не передавать идентификатор.

Id моделей — это канонические селекторы прокси, поэтому маршрутизируемые модели появляются как
`provider/model` (`anthropic/claude-opus-5`), а нативные slug OpenAI остаются без префикса
(`gpt-5.6-sol`). Суффикс в `name` — `(anthropic)`, `(native)`, `(routed)` — как раз и позволяет
Expand Down
6 changes: 6 additions & 0 deletions docs-site/src/content/docs/ru/reference/proxy-formats.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,12 @@ adapter, вместо тихого изменения смысла вернёт
клиенты. Большинство запросов переводится в Responses, маршрутизируется обычным образом, а затем
обратно в Anthropic JSON или Anthropic SSE.

Повторная передача reasoning в преобразуемых запросах Messages использует общий бюджет
преобразования запроса, включая копии при кодировании и декодировании. При превышении лимита
возвращается HTTP 413 с `translation_buffer_limit`; подписи и непрозрачные данные reasoning
не обрезаются для соблюдения лимита. Для нативного Anthropic passthrough действует отдельный
контракт ограничения размера тела.

Нативный Anthropic passthrough допустим только когда одновременно выполняются все условия:

- native passthrough не отключён в конфигурации Claude Code;
Expand Down
5 changes: 5 additions & 0 deletions docs-site/src/content/docs/tr/guides/pi.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ export line, and how many models carry authoritative context limits.
"baseUrl": "http://127.0.0.1:10100/v1",
"api": "openai-completions",
"apiKey": "$OPENCODEX_API_KEY",
"compat": {
"sendSessionAffinityHeaders": true
},
"models": [
{
"id": "anthropic/claude-opus-5",
Expand All @@ -45,6 +48,8 @@ export line, and how many models carry authoritative context limits.
}
```

Oluşturulan Pi sağlayıcılarında `compat.sendSessionAffinityHeaders` etkinleştirilir. Sağlayıcıyı birleştirirken veya elle düzenlerken bu ayarı koruyun: Pi sabit bir oturum kimliği gönderir ve OpenCodex bu kimlikten kanonik OpenCode Go hedefi için oturum yakınlığı üretir. `cacheRetention` değeri `none` olduğunda Pi kimliği göndermeyebilir.

Model ids are the proxy's canonical selectors, so routed models appear as
`provider/model`
(`anthropic/claude-opus-5`) and native OpenAI slugs stay unprefixed
Expand Down
5 changes: 5 additions & 0 deletions docs-site/src/content/docs/zh-cn/guides/pi.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ ocx export --client pi
"baseUrl": "http://127.0.0.1:10100/v1",
"api": "openai-completions",
"apiKey": "$OPENCODEX_API_KEY",
"compat": {
"sendSessionAffinityHeaders": true
},
"models": [
{
"id": "anthropic/claude-opus-5",
Expand All @@ -37,6 +40,8 @@ ocx export --client pi
}
```

生成的 Pi 提供方配置启用了 `compat.sendSessionAffinityHeaders`。合并或手动编辑提供方时请保留该设置:Pi 提供稳定的会话标识,OpenCodex 据此为规范的 OpenCode Go 目标生成会话亲和标识。`cacheRetention` 为 `none` 时,Pi 可能不发送会话标识。

模型 id 是代理的规范选择器,因此已路由模型会显示为 `provider/model`(`anthropic/claude-opus-5`),而原生 OpenAI slug 会保持不带前缀(`gpt-5.6-sol`)。`name` 后缀 - `(anthropic)`、`(native)`、`(routed)` - 负责让两个同名但来自不同上游的模型在 Pi 的选择器中可区分。

## 放置位置
Expand Down
4 changes: 4 additions & 0 deletions docs-site/src/content/docs/zh-cn/reference/proxy-formats.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@ choice 增量、带 `finish_reason` 的终止 choice,以及 `data: [DONE]`。

这些端点使用 Claude Code 和兼容客户端所采用的 Anthropic Messages 方言。大多数请求会被转换为 Responses,按常规路由,然后再转换回 Anthropic JSON 或 Anthropic SSE。

转换后的 Messages 请求在重放推理数据时共享整个请求的转换预算,其中包含编码和解码产生的副本开销。
超出预算时返回 HTTP 413 和 `translation_buffer_limit`,不会为了满足限制而截断签名或不透明推理数据。
原生 Anthropic 透传使用独立的请求体大小限制。

只有在满足以下全部条件时,原生 Anthropic 透传才有资格启用:

- Claude Code 配置中尚未禁用原生透传;
Expand Down
5 changes: 5 additions & 0 deletions docs-site/src/content/docs/zh-tw/guides/pi.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ ocx export --client pi
"baseUrl": "http://127.0.0.1:10100/v1",
"api": "openai-completions",
"apiKey": "$OPENCODEX_API_KEY",
"compat": {
"sendSessionAffinityHeaders": true
},
"models": [
{
"id": "anthropic/claude-opus-5",
Expand All @@ -37,6 +40,8 @@ ocx export --client pi
}
```

產生的 Pi 供應商設定會啟用 `compat.sendSessionAffinityHeaders`。合併或手動編輯供應商時請保留此設定:Pi 提供穩定的工作階段識別碼,OpenCodex 據此為標準 OpenCode Go 目標產生工作階段親和識別碼。當 `cacheRetention` 為 `none` 時,Pi 可能不傳送識別碼。

模型 id 是代理的規範選擇器,因此路由模型顯示為 `provider/model`(`anthropic/claude-opus-5`),而原生 OpenAI slug 保持無前綴(`gpt-5.6-sol`)。`name` 後綴 — `(anthropic)`、`(native)`、`(routed)` — 正是讓來自不同上游的兩個同名模型在 Pi 的 picker 中可區分的關鍵。

## 放置位置
Expand Down
Loading
Loading