Repository navigation
feat(api-proxy): constrain routing candidate efforts before ranking - #10425
SivaKesava1 with Copilot wants to merge 2 commits into
Conversation
Co-authored-by: SivaKesava1 <[email protected]>
Documentation PreviewDocumentation has been built for this PR. To view locally:
Built from commit e899985 |
✅ Coverage Check PassedOverall Coverage
Coverage comparison generated by |
|
Is the list of supported efforts independent of the model or model family? For instance, can codex not support max for 5.6 models but support it for gpt 6 models? Do we need to combine allowed models and efforts together into a single allowed list (e.g., gpt-5.6-luna:[low,medium,high,xhigh] )? |
|
Good question. I checked, and it changes the fix. Effort support is per model, and AWF already handles that part. AWF builds candidates from each model's live
So a model that doesn't offer The engine list in gh-aw is about what the client accepts, and for Codex it looks stale. To check, I ran Codex on Copilot in our sandbox with So the failure in #10424 is gh-aw refusing an effort the engine and the model both support. The simpler fix is in gh-aw: update the Codex set in |
|
Closing: as discussed above, AWF already ranks only the efforts each model advertises, and the Codex failure in #10424 comes from gh-aw's stale per-engine effort list (Codex 0.163.0 accepts |
AWF routing can pick a model/effort pair the provider supports but the consuming engine refuses. For example, Codex rejected
gpt-5.6-luna:maxat startup even though a runnablegpt-5.6-sol:mediumwas ranked second. This PR adds an optional, caller-supplied effort allowlist and applies it to the candidate pool before the classifier and route requests are made.Config surface
allowedEffortsis added toapiProxy.routingindocs/awf-config.schema.json, regenerated intosrc/awf-config-schema.json, and typed inModelRoutingConfig. The schema requires a non-empty list of unique values drawn from the seven contract efforts.routing-config.jsperforms the same validation at proxy startup, rejecting non-arrays, empty lists, unknown values and duplicates. Invalid values cause an error and are never silently dropped.AWF_ROUTING_CONFIGspread, so no CLI wiring changes are needed.Candidate filtering (
routing-candidates.js)claude-haiku-4.5,efforts: []) stay eligible and are not treated asnone.no_routecode, and the classifier and router are never called. The detail names the constraint:The routing.allowedEfforts constraint (minimal) excludes every eligible model choiceAudit and
/reflectallowed_effortsis added to classification, selection and failure records, but only when the constraint is configured.routing-persistence.jsallowlist, so it reachesmodel-routing.jsonl./reflectroutingshowsallowed_effortsin every status (pending, selected, failed) when configured. Audits can then tell an excluded arm from one the router merely ranked lower.docs/awf-config-spec.md(field table, semantics, audit-record contract) anddocs/api-proxy-sidecar.md(/reflect).Tests
containers/api-proxy/routing-effort-constraint.test.js.config_schema_rejects_unknown_constrained_effortis insrc/config-file-validation.test.ts.Out of scope
The gh-aw side is a separate github/gh-aw follow-up: emitting each engine's accepted efforts into this field, version-gating that emission, and adding a routed Codex smoke test.