Skip to content

Accept AWF endpoint names in the Codex sub-agent endpoint check - #78559

Merged
rabeckett merged 2 commits into
mainfrom
routing/subagent-endpoint-names
Nov 17, 2026
Merged

rabeckett merged 2 commits into
mainfrom
routing/subagent-endpoint-names

Conversation

@rabeckett

@rabeckett rabeckett commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

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 /reflect supported_endpoints literally against /responses. The Copilot catalogue lists paths, but AWF lists native provider endpoints by protocol name, so OpenAI models advertise responses. In Package Specification Enforcer run 39771119523, small resolved to gpt-5-mini-2025-08-07, whose entry lists ["chat_completions", "responses"], and all three sub-agents then failed with catalog_unavailable. A model with complete metadata fares worse: gpt-5.4, one of the two OpenAI entries in that catalogue marked complete (with its dated gpt-5.4-2026-03-05), fails as unsupported_endpoint.

endpointSupportIn now maps each entry's supported_endpoints through routingEndpointPaths before 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 lacks responses still fails with unsupported_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 /reflect and the readme-spec-extractor agent as spec-enforcer.md declared it at the run's revision. The recorded small agent now resolves to gpt-5-mini-2025-08-07. An exact gpt-5.4 is accepted, and the same model fails with unsupported_endpoint once its complete metadata lists only chat_completions. Replaying these cases against main reproduces the run's catalog_unavailable record and the false unsupported_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 as driver_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-researcher and spec-enforcer worked around this), so the fix matters for user workflows.

Local validation covered Prettier, tsc --noEmit and ESLint on the touched files, and a direct replay of the new cases. The engine_subagent_models.test.cjs suite needs the Go fixture compiler and Linux, so CI runs it.

Fixes #71157

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]>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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

@rabeckett
rabeckett marked this pull request as ready for review November 17, 2026 01:48
@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Specification Reviewer completed successfully!

PR Specification Reviewer

Outcome: reported_action

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.

Generated by PR Specification Reviewer for #78559 · copilot · gpt56 · ~2 AIC · ⌖ ~2 AIC · ⊞ 1.6K · ◷

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Code Quality Reviewer completed the code quality review.

PR Code Quality Reviewer

Outcome: reported_action

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.

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt56 · ~3 AIC · ⌖ ~1 AIC · ⊞ 1.5K · ◷

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

✅ Test Quality Sentinel completed test quality analysis.

Test Quality Sentinel

Outcome: reported_no_action

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.

🧪 Test quality analysis by Test Quality Sentinel · copilot · routed: haiku55 xhigh · ~1 AIC · ⌖ ~2 AIC · ⊞ 7.3K · ◷

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~7 AIC · ⌖ ~2 AIC · ⊞ 6.7K · ◷

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

✅ Ponytail Reviewer completed successfully!

Ponytail Reviewer

Outcome: reported_no_action

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.

Generated by Ponytail Reviewer for #78559 · codex · routed: gpt61 medium · ~7 AIC · ⌖ ~1 AIC · ⊞ 185 · ◷

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@github-actions

Copy link
Copy Markdown
Contributor

Comment Memory

Peek at saved memory (spec-review-history)
{"id":"ldg-6d106dac-8945-4e4c-a3ad-fe596fbb269e","parents":[],"payload":{"id":"ldg-b665db5c-b695-470a-a3c6-2156f66bf2c5","operation":"append","value":{"finding_count":0,"head_sha":"6169211ca23389f14876481eb4806ec22b55e725","outcome":"aligned"}},"sha":"sha256:7aeadb0ba6c25632d104b91f24c5ed607f0d8ddc79f7acd7437fd12e6ad3e052","timestamp":"2026-11-17T01:55:47.992Z","type":"ledger_append","version":1}
History

@github-actions

Copy link
Copy Markdown
Contributor

Comment Memory

Peek at saved memory (review-history)
{"id":"ldg-a276eb75-9ad3-415b-86fe-093a45926ee2","parents":[],"payload":{"id":"ldg-7283ec1d-f7d7-4d0c-ae9d-ff29c171c3f1","operation":"append","value":{"finding_count":0,"head_sha":"6169211ca23389f14876481eb4806ec22b55e725","outcome":"no_findings"}},"sha":"sha256:03487bb4696148a1756210a85110e0515d363a167c108b44219b395af069926a","timestamp":"2026-11-17T01:56:31.968Z","type":"ledger_append","version":1}
History

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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: routingEndpointPaths maps any .../responses entry, so ws:/responses counts as HTTP support.
  • Test comment accuracy: gpt-5.4-2026-03-05 is also complete metadata, so the comment overstates uniqueness.
  • Follow-up (not blocking): awf_reflect.cjs (~line 1034–1040) still compares /responses literally in SDK multi-provider mode. Outside this diff.

Positive Highlights

  • ✅ Root cause addressed, not a symptom patch.
  • ✅ Behavior verified by replay: small resolves and gpt-5.4 is 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]>
@rabeckett

Copy link
Copy Markdown
Collaborator Author

On the two other notes in the skills-based review:

ws:/responses counting as /responses comes from routingEndpointPaths, which native main-model routing already uses, so a sub-agent and its main agent read a model's endpoints the same way. In every recorded Copilot catalogue under actions/setup/js/fixtures, ws:/responses only appears next to /responses, so it changes no current result. If it should be excluded, that belongs in the shared helper for both callers, not in this fix.

The literal /responses comparison in awf_reflect.cjs (SDK multi-provider mode) only runs for Copilot endpoints, whose catalogue lists paths. Other endpoints there don't read supported_endpoints, so it isn't affected by AWF's native protocol names.

@rabeckett
rabeckett requested a review from pelikhan November 17, 2026 02:15
@rabeckett

Copy link
Copy Markdown
Collaborator Author

@pelikhan this is ready for review at 5339d7c. CI is green (23 checks passed, none failing), the branch is clean against main, and the one review thread is resolved. impacted-js-tests ran engine_subagent_models.test.cjs on Linux, and all 66 tests passed, including the three new ones.

I didn't run the full local make agent-report-progress gate because this machine has no Go toolchain. The change is JavaScript-only, and lint-js, js-typecheck, build and every JS shard pass in CI. A sandbox run doesn't apply here: the routing sandbox has no OpenAI key, and the Copilot-provider path is unchanged. Could you merge it when you're happy with it?

@rabeckett
rabeckett merged commit 409d306 into main Nov 17, 2026
44 checks passed
@rabeckett
rabeckett deleted the routing/subagent-endpoint-names branch November 17, 2026 02:23
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v1.3.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Codex sub-agent endpoint checks reject OpenAI responses metadata as catalog unavailable

2 participants