codex-as-api 0.9.3__tar.gz → 0.9.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {codex_as_api-0.9.3 → codex_as_api-0.9.5}/PKG-INFO +10 -1
- {codex_as_api-0.9.3 → codex_as_api-0.9.5}/README.md +9 -0
- {codex_as_api-0.9.3 → codex_as_api-0.9.5}/RELEASES.md +33 -0
- {codex_as_api-0.9.3 → codex_as_api-0.9.5}/pyproject.toml +1 -1
- {codex_as_api-0.9.3 → codex_as_api-0.9.5}/src/codex_as_api/__init__.py +1 -1
- {codex_as_api-0.9.3 → codex_as_api-0.9.5}/src/codex_as_api/server.py +1 -1
- {codex_as_api-0.9.3 → codex_as_api-0.9.5}/tests/test_provider.py +3 -3
- {codex_as_api-0.9.3 → codex_as_api-0.9.5}/tests/test_server.py +1 -1
- {codex_as_api-0.9.3 → codex_as_api-0.9.5}/.gitignore +0 -0
- {codex_as_api-0.9.3 → codex_as_api-0.9.5}/LICENSE +0 -0
- {codex_as_api-0.9.3 → codex_as_api-0.9.5}/THIRD_PARTY_NOTICES.md +0 -0
- {codex_as_api-0.9.3 → codex_as_api-0.9.5}/config/codex-upstream-contract.json +0 -0
- {codex_as_api-0.9.3 → codex_as_api-0.9.5}/config/o200k_base.tiktoken +0 -0
- {codex_as_api-0.9.3 → codex_as_api-0.9.5}/config/verified-hidden-models.json +0 -0
- {codex_as_api-0.9.3 → codex_as_api-0.9.5}/requirements.txt +0 -0
- {codex_as_api-0.9.3 → codex_as_api-0.9.5}/rust/THIRD_PARTY_NOTICES.md +0 -0
- {codex_as_api-0.9.3 → codex_as_api-0.9.5}/scripts/check_no_static_model_catalog.py +0 -0
- {codex_as_api-0.9.3 → codex_as_api-0.9.5}/scripts/check_package_versions.py +0 -0
- {codex_as_api-0.9.3 → codex_as_api-0.9.5}/scripts/check_registry_release.py +0 -0
- {codex_as_api-0.9.3 → codex_as_api-0.9.5}/scripts/check_release_artifacts.py +0 -0
- {codex_as_api-0.9.3 → codex_as_api-0.9.5}/scripts/generate_rust_third_party_notices.py +0 -0
- {codex_as_api-0.9.3 → codex_as_api-0.9.5}/scripts/package_rust_release.py +0 -0
- {codex_as_api-0.9.3 → codex_as_api-0.9.5}/src/codex_as_api/anthropic_adapter.py +0 -0
- {codex_as_api-0.9.3 → codex_as_api-0.9.5}/src/codex_as_api/auth.py +0 -0
- {codex_as_api-0.9.3 → codex_as_api-0.9.5}/src/codex_as_api/codex_config.py +0 -0
- {codex_as_api-0.9.3 → codex_as_api-0.9.5}/src/codex_as_api/codex_version.py +0 -0
- {codex_as_api-0.9.3 → codex_as_api-0.9.5}/src/codex_as_api/messages.py +0 -0
- {codex_as_api-0.9.3 → codex_as_api-0.9.5}/src/codex_as_api/model_capabilities.py +0 -0
- {codex_as_api-0.9.3 → codex_as_api-0.9.5}/src/codex_as_api/o200k_tokenizer.py +0 -0
- {codex_as_api-0.9.3 → codex_as_api-0.9.5}/src/codex_as_api/protocol.py +0 -0
- {codex_as_api-0.9.3 → codex_as_api-0.9.5}/src/codex_as_api/provider.py +0 -0
- {codex_as_api-0.9.3 → codex_as_api-0.9.5}/src/codex_as_api/reasoning_signature.py +0 -0
- {codex_as_api-0.9.3 → codex_as_api-0.9.5}/src/codex_as_api/strict_json.py +0 -0
- {codex_as_api-0.9.3 → codex_as_api-0.9.5}/tests/__init__.py +0 -0
- {codex_as_api-0.9.3 → codex_as_api-0.9.5}/tests/conftest.py +0 -0
- {codex_as_api-0.9.3 → codex_as_api-0.9.5}/tests/fixtures/o200k_base_encode_ordinary.json +0 -0
- {codex_as_api-0.9.3 → codex_as_api-0.9.5}/tests/test_anthropic_adapter.py +0 -0
- {codex_as_api-0.9.3 → codex_as_api-0.9.5}/tests/test_auth.py +0 -0
- {codex_as_api-0.9.3 → codex_as_api-0.9.5}/tests/test_codex_config.py +0 -0
- {codex_as_api-0.9.3 → codex_as_api-0.9.5}/tests/test_codex_version.py +0 -0
- {codex_as_api-0.9.3 → codex_as_api-0.9.5}/tests/test_messages.py +0 -0
- {codex_as_api-0.9.3 → codex_as_api-0.9.5}/tests/test_model_capabilities.py +0 -0
- {codex_as_api-0.9.3 → codex_as_api-0.9.5}/tests/test_no_static_model_catalog.py +0 -0
- {codex_as_api-0.9.3 → codex_as_api-0.9.5}/tests/test_o200k_tokenizer.py +0 -0
- {codex_as_api-0.9.3 → codex_as_api-0.9.5}/tests/test_package_versions.py +0 -0
- {codex_as_api-0.9.3 → codex_as_api-0.9.5}/tests/test_protocol.py +0 -0
- {codex_as_api-0.9.3 → codex_as_api-0.9.5}/tests/test_registry_release.py +0 -0
- {codex_as_api-0.9.3 → codex_as_api-0.9.5}/tests/test_release_artifacts.py +0 -0
- {codex_as_api-0.9.3 → codex_as_api-0.9.5}/tests/test_rust_third_party_notices.py +0 -0
- {codex_as_api-0.9.3 → codex_as_api-0.9.5}/tests/test_strict_json.py +0 -0
- {codex_as_api-0.9.3 → codex_as_api-0.9.5}/tests/test_ultrafast.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: codex-as-api
|
|
3
|
-
Version: 0.9.
|
|
3
|
+
Version: 0.9.5
|
|
4
4
|
Summary: Use ChatGPT/Codex OAuth as a local OpenAI-compatible API server.
|
|
5
5
|
Project-URL: Homepage, https://github.com/Eunho-J/codex-as-api
|
|
6
6
|
Project-URL: Repository, https://github.com/Eunho-J/codex-as-api
|
|
@@ -491,6 +491,15 @@ client-chosen voice-session id (`id`, `session_id`, `voice_session_id`), because
|
|
|
491
491
|
the backend denies calls that set those itself. On success it returns `201` with
|
|
492
492
|
the SDP answer as `text/plain` and a mirror `Location: /v1/realtime/calls/{call_id}`.
|
|
493
493
|
|
|
494
|
+
A session with `"type": "realtime"` creates a standard Realtime call instead
|
|
495
|
+
(`gpt-realtime-1.5` by default, voice `marin`): it carries function `tools` and
|
|
496
|
+
`tool_choice` rather than `delegation`, and the proxy sends it to the backend's
|
|
497
|
+
bare `/realtime/calls` route without the ChatGPT Live intent, architecture or
|
|
498
|
+
`openai-alpha` header. Library callers can also pass `mode: "realtime"` to
|
|
499
|
+
`createRealtimeCall`. Tool calls and their outputs then follow the standard
|
|
500
|
+
Realtime events on the sideband (`response.output_item.done` with a
|
|
501
|
+
`function_call` item, `conversation.item.create` with a `function_call_output`).
|
|
502
|
+
|
|
494
503
|
```bash
|
|
495
504
|
curl -i http://localhost:18080/v1/realtime/calls \
|
|
496
505
|
-H "Content-Type: application/json" \
|
|
@@ -457,6 +457,15 @@ client-chosen voice-session id (`id`, `session_id`, `voice_session_id`), because
|
|
|
457
457
|
the backend denies calls that set those itself. On success it returns `201` with
|
|
458
458
|
the SDP answer as `text/plain` and a mirror `Location: /v1/realtime/calls/{call_id}`.
|
|
459
459
|
|
|
460
|
+
A session with `"type": "realtime"` creates a standard Realtime call instead
|
|
461
|
+
(`gpt-realtime-1.5` by default, voice `marin`): it carries function `tools` and
|
|
462
|
+
`tool_choice` rather than `delegation`, and the proxy sends it to the backend's
|
|
463
|
+
bare `/realtime/calls` route without the ChatGPT Live intent, architecture or
|
|
464
|
+
`openai-alpha` header. Library callers can also pass `mode: "realtime"` to
|
|
465
|
+
`createRealtimeCall`. Tool calls and their outputs then follow the standard
|
|
466
|
+
Realtime events on the sideband (`response.output_item.done` with a
|
|
467
|
+
`function_call` item, `conversation.item.create` with a `function_call_output`).
|
|
468
|
+
|
|
460
469
|
```bash
|
|
461
470
|
curl -i http://localhost:18080/v1/realtime/calls \
|
|
462
471
|
-H "Content-Type: application/json" \
|
|
@@ -1,5 +1,38 @@
|
|
|
1
1
|
# Release Notes
|
|
2
2
|
|
|
3
|
+
## v0.9.5
|
|
4
|
+
|
|
5
|
+
### Standard Realtime calls with function tools
|
|
6
|
+
|
|
7
|
+
- `POST /v1/realtime/calls` and `createRealtimeCall` create a standard Realtime
|
|
8
|
+
call when the session says `"type": "realtime"` (or the library caller passes
|
|
9
|
+
`mode: "realtime"`): the model defaults to `gpt-realtime-1.5` and the voice to
|
|
10
|
+
`marin`, no `delegation` is injected, and the request goes to the bare
|
|
11
|
+
`/realtime/calls` route without `intent=quicksilver&architecture=avas` or the
|
|
12
|
+
`openai-alpha: quicksilver=v2` header. Measured against the ChatGPT backend
|
|
13
|
+
on 2026-10-27: the bare route accepts this session with function `tools`, while
|
|
14
|
+
each ChatGPT Live parameter on its own is refused with a 400
|
|
15
|
+
(`architecture="avas" is only supported for quicksilver Realtime WebRTC
|
|
16
|
+
sessions`, `Header OpenAI-Alpha requires intent=quicksilver&architecture=avas`,
|
|
17
|
+
`Invalid intent quicksilver`). The sideband relay is unchanged.
|
|
18
|
+
- ChatGPT Live calls (`mode: "live"`, the default) are unchanged.
|
|
19
|
+
- Realtime remains TypeScript-only; the Python and Rust runtimes are unchanged
|
|
20
|
+
apart from the aligned version.
|
|
21
|
+
|
|
22
|
+
## v0.9.4
|
|
23
|
+
|
|
24
|
+
### Realtime voice session id
|
|
25
|
+
|
|
26
|
+
- Forward an optional client voice session id as the `voice-session-id` header
|
|
27
|
+
on ChatGPT Live call creation and on the sideband join, matching Codex 0.164.0
|
|
28
|
+
(openai/codex #53784). It stays distinct from the realtime session id sent as
|
|
29
|
+
`x-session-id` / `session-id`. `createRealtimeCall` and `relayRealtimeSideband`
|
|
30
|
+
take `voiceSessionId`; `POST /v1/realtime/calls` forwards a `voice-session-id`
|
|
31
|
+
request header and echoes it. Ids outside `[A-Za-z0-9_.:-]{1,200}` are refused
|
|
32
|
+
before any upstream request.
|
|
33
|
+
- Realtime remains TypeScript-only; the Python and Rust runtimes are unchanged
|
|
34
|
+
apart from the aligned version.
|
|
35
|
+
|
|
3
36
|
## v0.9.3
|
|
4
37
|
|
|
5
38
|
### Prompt cache routing headers
|
|
@@ -2193,7 +2193,7 @@ def test_codex_cli_headers_include_official_originator_and_versioned_user_agent(
|
|
|
2193
2193
|
|
|
2194
2194
|
assert headers["originator"] == "codex_cli_rs"
|
|
2195
2195
|
assert headers["User-Agent"].startswith("codex_cli_rs/0.164.0 (")
|
|
2196
|
-
assert headers["User-Agent"].endswith(") codex-as-api/0.9.
|
|
2196
|
+
assert headers["User-Agent"].endswith(") codex-as-api/0.9.5")
|
|
2197
2197
|
|
|
2198
2198
|
|
|
2199
2199
|
def test_codex_cli_headers_reject_unpinned_version():
|
|
@@ -2933,7 +2933,7 @@ def test_provider_headers_include_codex_cli_headers(auth_json_factory):
|
|
|
2933
2933
|
|
|
2934
2934
|
assert headers["originator"] == "codex_cli_rs"
|
|
2935
2935
|
assert headers["User-Agent"].startswith("codex_cli_rs/0.164.0 (")
|
|
2936
|
-
assert headers["User-Agent"].endswith(") codex-as-api/0.9.
|
|
2936
|
+
assert headers["User-Agent"].endswith(") codex-as-api/0.9.5")
|
|
2937
2937
|
assert headers["Authorization"].startswith("Bearer ")
|
|
2938
2938
|
|
|
2939
2939
|
|
|
@@ -4534,7 +4534,7 @@ def test_provider_injects_dynamic_npm_version_across_catalog_responses_and_401_r
|
|
|
4534
4534
|
for full_url, headers in observed_requests:
|
|
4535
4535
|
assert full_url == "https://example.test/codex/models?client_version=0.175.2"
|
|
4536
4536
|
assert headers["user-agent"].startswith("codex_cli_rs/0.175.2 (")
|
|
4537
|
-
assert headers["user-agent"].endswith(") codex-as-api/0.9.
|
|
4537
|
+
assert headers["user-agent"].endswith(") codex-as-api/0.9.5")
|
|
4538
4538
|
|
|
4539
4539
|
|
|
4540
4540
|
def test_provider_cold_version_resolver_failure_raises_typed_503(auth_json_factory, monkeypatch):
|
|
@@ -6648,7 +6648,7 @@ def test_dynamic_npm_version_resolver_updates_models_query_user_agent_and_cold_f
|
|
|
6648
6648
|
responses_req_1 = recording_backend.requests.get(timeout=1)
|
|
6649
6649
|
assert catalog_req_1["path"] == "/models?client_version=0.175.2"
|
|
6650
6650
|
assert catalog_req_1["headers"]["user-agent"].startswith("codex_cli_rs/0.175.2 (")
|
|
6651
|
-
assert catalog_req_1["headers"]["user-agent"].endswith(") codex-as-api/0.9.
|
|
6651
|
+
assert catalog_req_1["headers"]["user-agent"].endswith(") codex-as-api/0.9.5")
|
|
6652
6652
|
assert responses_req_1["headers"]["user-agent"].startswith("codex_cli_rs/0.175.2 (")
|
|
6653
6653
|
|
|
6654
6654
|
active_version = "0.176.0"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|