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
124 changes: 72 additions & 52 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
tiktoken-rs = "0.12"
dialoguer = { version = "0.12", default-features = false, features = ["fuzzy-select", "password"] }
self_update = { version = "0.44", default-features = false, features = ["reqwest", "rustls", "archive-tar", "compression-flate2", "archive-zip", "compression-zip-deflate"] }
self_update = { version = "1.3.3", default-features = false, features = ["github", "progress-bar", "reqwest", "rustls", "compression-tar-gz", "compression-zip-deflate"] }
toml = "1.1"

[dev-dependencies]
Expand Down
5 changes: 5 additions & 0 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ require a key on the LLM endpoints; see [Authentication](#authentication) below.

## Endpoints

Inference HTTP requests accept JSON objects up to 32 MiB. There is a shared
limit of 262,144 field values and array elements across the request, including
nested objects and arrays. Invalid JSON, non-object requests, or requests over
the value limit receive HTTP 400; exceeding the byte limit returns HTTP 413.

| Method & path | Description |
|---------------|-------------|
| `POST /v1/chat/completions` | OpenAI chat completions (also `/chat/completions`) |
Expand Down
11 changes: 5 additions & 6 deletions docs/claude-code.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,11 @@ A `model` already in the file is treated as a deliberate choice and kept; the
recommended default is only written when the config has none.

The provider uses command-backed authentication through `ghc-proxy codex-auth-token`.
Besides supplying the current local `api_key` (or a harmless
placeholder when authentication is disabled), this tells Codex to refresh the
provider's model catalog. No OpenAI account or exported environment variable is
required. When an `api_key` is active during setup, its resolved value is also
written as `x-api-key`; this keeps environment-only proxy launches working when
ChatGPT Desktop does not inherit the server's shell environment.
The helper returns a non-secret placeholder so Codex refreshes the provider's
model catalog; it never prints the proxy API key. When authentication is
enabled, setup writes the resolved key as the provider's `x-api-key` header.
Re-run Codex setup after enabling or rotating the key, including when upgrading
a configuration that relied on the command alone. Keep the Codex config private.

Codex requests `GET /v1/models?client_version=...`; the proxy recognizes that
query and returns Codex-native model metadata with `context_window` and
Expand Down
4 changes: 3 additions & 1 deletion docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,9 @@ rewritten to follow them: see [Schema upgrades](#schema-upgrades).

### Account type

Controls the upstream base URL only:
Selects one of three fixed HTTPS origins. An unrecognized tier logs a warning
and uses `individual`; it cannot supply a custom upstream host.
Credentialed upstream HTTP requests do not follow redirects.

| `account_type` | Upstream base URL |
|----------------|-------------------|
Expand Down
1 change: 1 addition & 0 deletions scripts/ws_probe.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ def handshake(host: str, path: str, token: str, extra: dict[str, str]) -> tuple[
raw = f"GET {path} HTTP/1.1\r\n" + "".join(f"{k}: {v}\r\n" for k, v in headers.items()) + "\r\n"

ctx = ssl.create_default_context()
ctx.minimum_version = ssl.TLSVersion.TLSv1_2
with socket.create_connection((host, 443), timeout=20) as sock:
with ctx.wrap_socket(sock, server_hostname=host) as tls:
tls.sendall(raw.encode())
Expand Down
Loading
Loading