1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/// Hop-by-hop headers that must not be forwarded to clients per RFC 7230.
pub const HOP_BY_HOP: & = &;
/// Audio transcription and text-to-speech passthrough handlers.
/// AWS Bedrock native endpoint handlers (Converse API + InvokeModel, SigV4 signing).
/// AWS Bedrock passthrough handler (SigV4 signing + event stream decoding).
/// OpenAI Chat Completions input handler (POST /v1/chat/completions).
/// Gemini native input handler (POST /v1beta/models/{model}:generateContent from gemini-cli).
/// Gemini native generateContent handler (POST /v1/messages when GEMINI_API_FORMAT=native).
/// Generic catch-all passthrough for any /v1/* path without an explicit handler.
/// Image generation passthrough handler.
/// Auth validation, request ID injection, size limits, concurrency limits, header logging.
/// OIDC/JWT authentication (optional, enabled via OIDC_ISSUER_URL).
/// Anthropic passthrough handler (no translation, forwards as-is).
/// Per-key request policy enforcement (model allowlists).
/// Axum router setup and request handlers for all API endpoints.
/// SSE response helpers for Anthropic-format streaming.
/// Shared state types for request handlers (AppState, AnthropicJson, ResolvedModel, etc.).
/// SSE streaming handler with pre-stream error propagation and backpressure.
/// Approximate token counting via tiktoken.