[docs] docs: reduce bloat in engines.md (21% reduction)#27142
Conversation
Consolidate 5 near-identical "Custom API Endpoints" code blocks into a single table + one canonical example, and merge the Codex/Gemini/Crush per-engine timeout sections which were all identical. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Hey One note from the checklist: no test files are present in this diff. For a pure documentation PR like this one, test coverage isn't applicable — but if the doc site has any snapshot or rendering tests, it would be worth ensuring they still pass after the restructure. If you'd like a hand verifying the rendered output, you can assign this prompt to your coding agent:
|
There was a problem hiding this comment.
Pull request overview
Reduces repetition in the Engines reference documentation by consolidating highly similar per-engine sections into a table + canonical example, and combining duplicated timeout guidance.
Changes:
- Replaced repetitive “custom API endpoints via env vars” per-engine blocks with a single explanation, a mapping table, and one example config.
- Consolidated identical per-engine timeout sections for Codex/Gemini/Crush into a single combined section.
Show a summary per file
| File | Description |
|---|---|
docs/src/content/docs/reference/engines.md |
Consolidates repeated engine configuration docs (custom endpoints + timeouts) to reduce length and duplication. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 1/1 changed files
- Comments generated: 2
| #### Custom API Endpoints via Environment Variables | ||
|
|
||
| Three environment variables receive special treatment when set in `engine.env`: `OPENAI_BASE_URL` (for `codex` and `crush`), `ANTHROPIC_BASE_URL` (for `claude`), `GITHUB_COPILOT_BASE_URL` (for `copilot`), and `GEMINI_API_BASE_URL` (for `gemini`). When any of these is present, the API proxy automatically routes API calls to the specified host instead of the default endpoint. Firewall enforcement remains active, but this routing layer is not a separate authentication boundary for arbitrary code already running inside the agent container. | ||
| Set a base URL environment variable in `engine.env` to route API calls to an internal LLM router, Azure OpenAI deployment, or corporate proxy. AWF automatically extracts the hostname and applies it to the API proxy. The target domain must also appear in `network.allowed`. |
There was a problem hiding this comment.
The text says “AWF automatically extracts the hostname …”. In practice the hostname (and path) extraction happens in gh-aw when building the AWF invocation args (e.g., pkg/workflow/awf_helpers.go), and AWF just receives --*-api-target/--*-api-base-path. Consider rewording to reflect that gh-aw/compilation configures the proxy (and optionally mention that path components are forwarded via the corresponding --*-api-base-path flag).
| Set a base URL environment variable in `engine.env` to route API calls to an internal LLM router, Azure OpenAI deployment, or corporate proxy. AWF automatically extracts the hostname and applies it to the API proxy. The target domain must also appear in `network.allowed`. | |
| Set a base URL environment variable in `engine.env` to route API calls to an internal LLM router, Azure OpenAI deployment, or corporate proxy. When compiling the workflow, `gh-aw` derives the API proxy configuration from that URL, forwarding the hostname as the API target and any path component as the corresponding API base path. The target domain must also appear in `network.allowed`. |
| ``` | ||
|
|
||
| Crush uses the OpenAI-compatible API format by default (via Copilot routing). The `model` field uses a `provider/model` format — the provider prefix determines which API domains are added to the firewall allowlist. | ||
| `GITHUB_COPILOT_BASE_URL` is a fallback — if both it and `engine.api-target` are set, `engine.api-target` takes precedence. Crush uses OpenAI-compatible API format; its `model` field uses `provider/model` format (e.g., `openai/gpt-4o`). |
There was a problem hiding this comment.
The Crush note mentions provider/model format but drops the key behavioral implication: the provider prefix controls which provider-specific API domains are added to the firewall allowlist (see pkg/workflow/domains.go where Crush domains are selected from the model provider). Please add that clarification so users understand why the prefix matters operationally.
| `GITHUB_COPILOT_BASE_URL` is a fallback — if both it and `engine.api-target` are set, `engine.api-target` takes precedence. Crush uses OpenAI-compatible API format; its `model` field uses `provider/model` format (e.g., `openai/gpt-4o`). | |
| `GITHUB_COPILOT_BASE_URL` is a fallback — if both it and `engine.api-target` are set, `engine.api-target` takes precedence. Crush uses OpenAI-compatible API format; its `model` field uses `provider/model` format (e.g., `openai/gpt-4o`). The `provider` prefix matters operationally: it determines which provider-specific API domains are added to the firewall allowlist. |
Removes documentation bloat from
docs/src/content/docs/reference/engines.mdby consolidating two highly repetitive sections.Changes
File improved:
docs/src/content/docs/reference/engines.mdLine reduction: 402 → 317 lines (−85 lines, 21.1%)
What was removed
1. Custom API Endpoints — 5 near-identical code blocks → table + 1 example
The "Custom API Endpoints via Environment Variables" section previously showed separate code blocks for each of the five engines (Codex, Claude, Copilot, Gemini, Crush), 86 lines total. Each block showed the same pattern: set a
*_BASE_URLenv var and add the domain tonetwork.allowed.Replaced with:
modelformat nuancesAll essential information is preserved; only the repetitive per-engine prose and code blocks were removed.
2. Per-engine timeout controls — 3 identical sections → 1 combined section
The Codex, Gemini, and Crush timeout sub-sections were word-for-word identical: "X does not support
max-turnsormax-continuations. Usetimeout-minutesandtools.timeoutto bound execution." Each had the same YAML. Combined into one "Codex, Gemini, and Crush" section.Screenshots
Visual screenshots were unavailable due to network isolation between the Playwright container and the agent container. The page was verified to render correctly via
curl— the condensed table and single code example rendered as expected, with no broken content.Blocked Domains
N/A — screenshots not captured.
References: §24620354131