Repository navigation
Accept AWF endpoint names in the Codex sub-agent endpoint check - #78559
Conversation
AWF lists native provider endpoints by protocol name (`responses`), while the Codex sub-agent check compared them literally against `/responses`. Normalize them with routingEndpointPaths, as native main-model routing already does, so Codex sub-agents on native OpenAI resolve again. Fixes #71157 Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
🟢 Approval recommended
The sub-agent endpoint normalization change has no active review issues.
No open issues 🎉
What changed in this PR
Fixes Codex sub-agent startup failures caused by native OpenAI endpoint names such as responses not matching /responses. The change reuses gh-aw’s main-model endpoint normalization while preserving fail-closed checks.
Changes:
- Normalize endpoint metadata before checking sub-agent model compatibility.
- Add recorded-run fixtures and regression tests for alias resolution, exact-model acceptance, and unsupported-endpoint rejection.
- Clarify native-provider endpoint naming in the sub-agent reference.
| File | Description |
|---|---|
docs/src/content/docs/reference/inline-sub-agents.md |
Documents native-provider protocol names. |
actions/setup/js/fixtures/claude-codex-sub-agents/spec-enforcer-39771119523/.codex/agents/readme-spec-extractor.md |
Adds the recorded workflow’s sub-agent definition. |
actions/setup/js/fixtures/claude_codex_subagent_runs.cjs |
Exposes Spec Enforcer fixtures and records their provenance. |
actions/setup/js/fixtures/awf-reflect-codex-spec-enforcer-39771119523.json |
Adds reduced OpenAI catalogue metadata from the affected run. |
actions/setup/js/engine_subagent_models.test.cjs |
Covers native endpoint-name acceptance and rejection. |
actions/setup/js/engine_subagent_models.cjs |
Normalizes endpoint names using the shared routing helper. |
Review effort: Balanced
|
✅ PR Specification Reviewer completed successfully! PR Specification ReviewerOutcome: The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ PR Code Quality Reviewer completed the code quality review. PR Code Quality ReviewerOutcome: The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ Test Quality Sentinel completed test quality analysis. Test Quality SentinelOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅
|
|
✅ Ponytail Reviewer completed successfully! Ponytail ReviewerOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
There was a problem hiding this comment.
Reviewed the changed lines and tests. I found no actionable correctness, regression, performance, or maintainability issues. The specialist pass was unavailable due workflow tool permissions; final assessment is based on the pre-fetched diff and targeted source inspection.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~3 AIC · ⌖ ~1 AIC · ⊞ 1.5K
Comment /review to run again
Comment MemoryPeek at saved memory (spec-review-history)History |
Comment MemoryPeek at saved memory (review-history)History |
There was a problem hiding this comment.
Skills-Based Review 🧠
Applied /diagnosing-bugs and /tdd to the one-line endpointSupportIn fix. The fix is correct: AWF protocol names now go through routingEndpointPaths, matching native main-model routing, and unknown or incomplete entries still fail closed.
📋 Key Themes & Highlights
Key Themes
- Suffix fallback breadth:
routingEndpointPathsmaps any.../responsesentry, sows:/responsescounts as HTTP support. - Test comment accuracy:
gpt-5.4-2026-03-05is also complete metadata, so the comment overstates uniqueness. - Follow-up (not blocking):
awf_reflect.cjs(~line 1034–1040) still compares/responsesliterally in SDK multi-provider mode. Outside this diff.
Positive Highlights
- ✅ Root cause addressed, not a symptom patch.
- ✅ Behavior verified by replay:
smallresolves andgpt-5.4is accepted on this branch. Both fail on a reverted baseline. - ✅ Fail-closed behavior preserved for
chat_completions-only entries.
Verification gap
The vitest suite was not run here because npm ci is blocked by a proxy TLS error in this sandbox. CI should confirm engine_subagent_models.test.cjs.
@copilot please address the review comments above.
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~7 AIC · ⌖ ~2 AIC · ⊞ 6.7K
Comment /matt to run again
gpt-5.4-2026-03-05 also has complete metadata in the recorded catalogue. Co-authored-by: Copilot <[email protected]>
|
On the two other notes in the skills-based review:
The literal |
|
@pelikhan this is ready for review at 5339d7c. CI is green (23 checks passed, none failing), the branch is clean against I didn't run the full local |
|
🎉 This pull request is included in a new release. Release: |
Codex sub-agents on the native OpenAI provider refuse to start when their model is declared, because the endpoint check added in #70945 compares each model's
/reflectsupported_endpointsliterally against/responses. The Copilot catalogue lists paths, but AWF lists native provider endpoints by protocol name, so OpenAI models advertiseresponses. In Package Specification Enforcer run 39771119523,smallresolved togpt-5-mini-2025-08-07, whose entry lists["chat_completions", "responses"], and all three sub-agents then failed withcatalog_unavailable. A model with complete metadata fares worse:gpt-5.4, one of the two OpenAI entries in that catalogue marked complete (with its datedgpt-5.4-2026-03-05), fails asunsupported_endpoint.endpointSupportInnow maps each entry'ssupported_endpointsthroughroutingEndpointPathsbefore looking for the engine's endpoint. That is the helper native main-model routing already uses for the same metadata (resolveNativeAWFModelRoutingSelection), so a sub-agent and its main agent now read a model's endpoints the same way. The check still fails closed. Unknown names are dropped, so a model whose complete metadata lacksresponsesstill fails withunsupported_endpoint, and a model without endpoint metadata is still refused. In the recorded OpenAI catalogue that leaves 44 of 135 models unverifiable, all of them image, audio, realtime, embedding, moderation, TTS, transcription, video or legacy completion models. Only Codex passes an endpoint to this check, so Claude sub-agents are unaffected.The new tests use the run's reduced
/reflectand thereadme-spec-extractoragent asspec-enforcer.mddeclared it at the run's revision. The recordedsmallagent now resolves togpt-5-mini-2025-08-07. An exactgpt-5.4is accepted, and the same model fails withunsupported_endpointonce its complete metadata lists onlychat_completions. Replaying these cases againstmainreproduces the run'scatalog_unavailablerecord and the falseunsupported_endpoint. The inline sub-agents reference now says native providers list protocol names.The issue's two other points are left for follow-ups: reporting an unverifiable endpoint separately from
catalog_unavailable, and not labelling an intentional pre-start refusal asdriver_crash. The A/B Testing Advisor model-list HTTP 500 it mentions is also separate. No workflow in this repository currently declares a sub-agent model on native OpenAI (daily-arxiv-researcherandspec-enforcerworked around this), so the fix matters for user workflows.Local validation covered Prettier,
tsc --noEmitand ESLint on the touched files, and a direct replay of the new cases. Theengine_subagent_models.test.cjssuite needs the Go fixture compiler and Linux, so CI runs it.Fixes #71157