Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ x-opencodex-api-key: your-secret-token
| `/v1/messages/count_tokens` |受け入れられました |受け入れられました |受け入れられました |
| `/v1/models` |受け入れられました |受け入れられました |受け入れられました |

応答とチャット完了では、Codex Direct パススルーの可能性のために `Authorization` を予約しているため、そこでは専用のアドミッション ヘッダーのみが受け入れられます。ダッシュボードで生成された `apiKeys` は、起動後に環境トークンを置き換える可能性があります。候補は一定時間内に比較されます
応答とチャット完了では、Codex Direct パススルーの可能性のために `Authorization` を予約しているため、そこでは専用のアドミッション ヘッダーのみが受け入れられます。ダッシュボードで生成された `apiKeys` は、起動後に環境トークンを置き換える可能性があります。候補値は定数時間で比較されます

Messages と `count_tokens` はルーティングクライアントとの互換性のために 3 つの admission 形式を引き続き受け入れます。
ただし非ループバック bind のネイティブ Anthropic パススルーでは、プロキシ admission は
Expand Down
6 changes: 6 additions & 0 deletions tests/loopback-listener-admission.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ describe("loopback listener policy view", () => {
expect(countTokensStart).toBeGreaterThan(-1);
expect(messagesStart).toBeGreaterThan(countTokensStart);
expect(chatStart).toBeGreaterThan(messagesStart);
expect(source.slice(countTokensStart, messagesStart)).toContain(
"await handleClaudeCountTokens(req, config, policy)",
);
expect(source.slice(messagesStart, chatStart)).toContain(
"await handleClaudeMessages(req, config, logCtx, { requestId, start, turnAdmissionLease }, policy)",
);
for (const branch of [
source.slice(countTokensStart, messagesStart),
source.slice(messagesStart, chatStart),
Expand Down
Loading