codex-as-api 0.9.4__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.
Files changed (51) hide show
  1. {codex_as_api-0.9.4 → codex_as_api-0.9.5}/PKG-INFO +10 -1
  2. {codex_as_api-0.9.4 → codex_as_api-0.9.5}/README.md +9 -0
  3. {codex_as_api-0.9.4 → codex_as_api-0.9.5}/RELEASES.md +19 -0
  4. {codex_as_api-0.9.4 → codex_as_api-0.9.5}/pyproject.toml +1 -1
  5. {codex_as_api-0.9.4 → codex_as_api-0.9.5}/src/codex_as_api/__init__.py +1 -1
  6. {codex_as_api-0.9.4 → codex_as_api-0.9.5}/src/codex_as_api/server.py +1 -1
  7. {codex_as_api-0.9.4 → codex_as_api-0.9.5}/tests/test_provider.py +3 -3
  8. {codex_as_api-0.9.4 → codex_as_api-0.9.5}/tests/test_server.py +1 -1
  9. {codex_as_api-0.9.4 → codex_as_api-0.9.5}/.gitignore +0 -0
  10. {codex_as_api-0.9.4 → codex_as_api-0.9.5}/LICENSE +0 -0
  11. {codex_as_api-0.9.4 → codex_as_api-0.9.5}/THIRD_PARTY_NOTICES.md +0 -0
  12. {codex_as_api-0.9.4 → codex_as_api-0.9.5}/config/codex-upstream-contract.json +0 -0
  13. {codex_as_api-0.9.4 → codex_as_api-0.9.5}/config/o200k_base.tiktoken +0 -0
  14. {codex_as_api-0.9.4 → codex_as_api-0.9.5}/config/verified-hidden-models.json +0 -0
  15. {codex_as_api-0.9.4 → codex_as_api-0.9.5}/requirements.txt +0 -0
  16. {codex_as_api-0.9.4 → codex_as_api-0.9.5}/rust/THIRD_PARTY_NOTICES.md +0 -0
  17. {codex_as_api-0.9.4 → codex_as_api-0.9.5}/scripts/check_no_static_model_catalog.py +0 -0
  18. {codex_as_api-0.9.4 → codex_as_api-0.9.5}/scripts/check_package_versions.py +0 -0
  19. {codex_as_api-0.9.4 → codex_as_api-0.9.5}/scripts/check_registry_release.py +0 -0
  20. {codex_as_api-0.9.4 → codex_as_api-0.9.5}/scripts/check_release_artifacts.py +0 -0
  21. {codex_as_api-0.9.4 → codex_as_api-0.9.5}/scripts/generate_rust_third_party_notices.py +0 -0
  22. {codex_as_api-0.9.4 → codex_as_api-0.9.5}/scripts/package_rust_release.py +0 -0
  23. {codex_as_api-0.9.4 → codex_as_api-0.9.5}/src/codex_as_api/anthropic_adapter.py +0 -0
  24. {codex_as_api-0.9.4 → codex_as_api-0.9.5}/src/codex_as_api/auth.py +0 -0
  25. {codex_as_api-0.9.4 → codex_as_api-0.9.5}/src/codex_as_api/codex_config.py +0 -0
  26. {codex_as_api-0.9.4 → codex_as_api-0.9.5}/src/codex_as_api/codex_version.py +0 -0
  27. {codex_as_api-0.9.4 → codex_as_api-0.9.5}/src/codex_as_api/messages.py +0 -0
  28. {codex_as_api-0.9.4 → codex_as_api-0.9.5}/src/codex_as_api/model_capabilities.py +0 -0
  29. {codex_as_api-0.9.4 → codex_as_api-0.9.5}/src/codex_as_api/o200k_tokenizer.py +0 -0
  30. {codex_as_api-0.9.4 → codex_as_api-0.9.5}/src/codex_as_api/protocol.py +0 -0
  31. {codex_as_api-0.9.4 → codex_as_api-0.9.5}/src/codex_as_api/provider.py +0 -0
  32. {codex_as_api-0.9.4 → codex_as_api-0.9.5}/src/codex_as_api/reasoning_signature.py +0 -0
  33. {codex_as_api-0.9.4 → codex_as_api-0.9.5}/src/codex_as_api/strict_json.py +0 -0
  34. {codex_as_api-0.9.4 → codex_as_api-0.9.5}/tests/__init__.py +0 -0
  35. {codex_as_api-0.9.4 → codex_as_api-0.9.5}/tests/conftest.py +0 -0
  36. {codex_as_api-0.9.4 → codex_as_api-0.9.5}/tests/fixtures/o200k_base_encode_ordinary.json +0 -0
  37. {codex_as_api-0.9.4 → codex_as_api-0.9.5}/tests/test_anthropic_adapter.py +0 -0
  38. {codex_as_api-0.9.4 → codex_as_api-0.9.5}/tests/test_auth.py +0 -0
  39. {codex_as_api-0.9.4 → codex_as_api-0.9.5}/tests/test_codex_config.py +0 -0
  40. {codex_as_api-0.9.4 → codex_as_api-0.9.5}/tests/test_codex_version.py +0 -0
  41. {codex_as_api-0.9.4 → codex_as_api-0.9.5}/tests/test_messages.py +0 -0
  42. {codex_as_api-0.9.4 → codex_as_api-0.9.5}/tests/test_model_capabilities.py +0 -0
  43. {codex_as_api-0.9.4 → codex_as_api-0.9.5}/tests/test_no_static_model_catalog.py +0 -0
  44. {codex_as_api-0.9.4 → codex_as_api-0.9.5}/tests/test_o200k_tokenizer.py +0 -0
  45. {codex_as_api-0.9.4 → codex_as_api-0.9.5}/tests/test_package_versions.py +0 -0
  46. {codex_as_api-0.9.4 → codex_as_api-0.9.5}/tests/test_protocol.py +0 -0
  47. {codex_as_api-0.9.4 → codex_as_api-0.9.5}/tests/test_registry_release.py +0 -0
  48. {codex_as_api-0.9.4 → codex_as_api-0.9.5}/tests/test_release_artifacts.py +0 -0
  49. {codex_as_api-0.9.4 → codex_as_api-0.9.5}/tests/test_rust_third_party_notices.py +0 -0
  50. {codex_as_api-0.9.4 → codex_as_api-0.9.5}/tests/test_strict_json.py +0 -0
  51. {codex_as_api-0.9.4 → 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.4
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,24 @@
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
+
3
22
  ## v0.9.4
4
23
 
5
24
  ### Realtime voice session id
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "codex-as-api"
7
- version = "0.9.4"
7
+ version = "0.9.5"
8
8
  description = "Use ChatGPT/Codex OAuth as a local OpenAI-compatible API server."
9
9
  readme = "README.md"
10
10
  license = { text = "Apache-2.0" }
@@ -1,3 +1,3 @@
1
1
  """codex-as-api: Use ChatGPT/Codex OAuth as a local OpenAI-compatible API server."""
2
2
 
3
- __version__ = "0.9.4"
3
+ __version__ = "0.9.5"
@@ -465,7 +465,7 @@ def _health_error_message(exc: BaseException) -> str:
465
465
  app = FastAPI(
466
466
  title="codex-as-api",
467
467
  description="Local OpenAI-compatible API server backed by ChatGPT/Codex OAuth.",
468
- version="0.9.4",
468
+ version="0.9.5",
469
469
  )
470
470
 
471
471
 
@@ -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.4")
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.4")
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.4")
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.4")
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