You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement local Ollama support for app-server transport and example suite
- Update app-server connection to pass configuration via --config overrides
instead of deprecated OSS-specific CLI flags.
- Introduce Codex.ExamplesSupport to provide centralized Ollama-aware model
and reasoning effort defaults for example scripts.
- Modify example runner to support --ollama mode, which enables CLI-backed
examples against Ollama while skipping unsupported OpenAI-only subsystems.
- Add deterministic fallback logic in example scripts for features currently
unreliable in local OSS mode, such as strict structured output schemas.
- Improve CLI command generation to correctly inject model_provider and model
settings into the codex app-server startup sequence.
Copy file name to clipboardExpand all lines: examples/README.md
+14Lines changed: 14 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,6 +51,17 @@ Run the same CLI-backed example set against local Codex OSS + Ollama:
51
51
The runner checks that the requested Ollama model is installed before starting
52
52
the examples.
53
53
54
+
In `--ollama` mode, the runner:
55
+
56
+
- executes the full CLI-backed example suite against the local Ollama-backed Codex route
57
+
- keeps app-server examples enabled by configuring `codex app-server` with supported
58
+
`--config` overrides instead of unsupported OSS argv flags
59
+
- uses deterministic local fallbacks where upstream features are not reliable on the
60
+
local OSS path (for example strict structured-output assertions or live web-search
61
+
event enforcement)
62
+
- skips the direct OpenAI realtime/voice examples, because those examples are not
63
+
Ollama-backed and use a separate direct API subsystem
64
+
54
65
If direct API credentials are missing, realtime/voice examples are reported as `SKIPPED` and do not fail the run.
55
66
If credentials exist but direct API access is unavailable (for example `insufficient_quota`, missing realtime model access, or an upstream Realtime `server_error`), direct API examples print `SKIPPED: <reason>`. Realtime demos now run a minimal raw-WebSocket health probe first and include the upstream `session_id` in the skip reason when OpenAI fails before any example-specific logic.
56
67
The native OAuth example also self-skips in runner contexts unless you point it
@@ -109,6 +120,9 @@ The `live_*.exs` scripts hit the live Codex CLI (no OPENAI_API_KEY needed if you
109
120
110
121
These examples use the OpenAI Realtime API directly (not via Codex CLI). They demonstrate real-time bidirectional voice interactions:
111
122
123
+
`./examples/run_all.sh --ollama` skips this entire section on purpose. Those examples are
124
+
OpenAI-only and do not participate in the local Codex OSS + Ollama route.
125
+
112
126
-`examples/live_realtime_voice.exs` — full realtime voice interaction demo with real audio I/O
113
127
-`examples/realtime_basic.exs` — basic realtime session setup with real audio input
114
128
-`examples/realtime_tools.exs` — using function tools with realtime agents
0 commit comments