Skip to content

[awf] api-proxy: token steering silently overrides explicit provider/model config, routes to unconfigured provider #6912

Description

@lpcox

Problem
apiProxy.enableTokenSteering is always emitted as true, undocumented, and not overridable from frontmatter. Token steering resolves the provider after explicit workflow config and without checking which provider slots are actually provisioned. This silently downgrades models (e.g. claude-sonnet-5claude-sonnet-4.5) and reroutes calls to providers the proxy itself reports as unconfigured (e.g. Copilot when only Anthropic is configured), causing 100% call failure and, in one case, a 17-minute non-terminating retry loop.

Context
See github/gh-aw#50113 for full repro (two runs, opencode and copilot BYOK engines). Related: #1454, #1970, #2198.

Root Cause
The steering alias map (e.g. sonnet-6x group, Copilot-first ordered) is resolved without filtering against the run's actually-configured provider slots (OpenAI=false, Anthropic=true, Copilot=false, ...), and without deferring to explicit COPILOT_PROVIDER_TYPE/GH_AW_ENGINE_MODEL config.

Proposed Solution

  1. Filter alias candidates against configured provider slots before resolving — never steer to a provider reporting configured: false.
  2. Honor explicit provider/model config over alias table, or fail loudly (not silently substitute) when overridden.
  3. Expose a documented enableTokenSteering override (frontmatter/env knob) to opt out per workflow.
  4. Treat "provider not configured" as a non-retryable, fast-fail error in the primary agent path (mirror the bounded 3-attempt policy already used by the title sub-agent).

Generated by Firewall Issue Dispatcher · auto · 23.8 AIC · ⊞ 9K ·

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions