You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[aw-failures] [aw-fix] P1: Daily BYOK Ollama Test — self-hosted qwen2.5:0.5b has no AI-credits pricing; api-proxy returns 400
[Content truncated due to length] #47684
Fix the AI-credits pricing gate for the BYOK path — add apiProxy.defaultAiCreditsPricing so self-hosted qwen2.5:0.5b stops getting rejected with HTTP 400.
The Daily BYOK Ollama Test has failed every daily run for 8+ consecutive days (100% AR). The Ollama setup succeeds (model pulls, /v1/models ready); the agent dies at Execute GitHub Copilot CLI because the api-proxy blocks the model on pricing, not connectivity.
Sub-issue of #46846 (same unknown_model_ai_credits 400 mechanism, different workflow/model).
Problem statement
All three copilot-harness attempts fail with an identical HTTP 400 from the api-proxy:
400 400 400 Model "qwen2.5:0.5b" has no AI credits pricing and no default pricing is configured.
Set apiProxy.defaultAiCreditsPricing in the AWF config (e.g. {"input": 3.0, "output": 15.0})
to provide a fallback rate, or add the model to the pricing table.
Exit code 1 → agent job failure. Output flag unknown_model_ai_credits is set; isHTTP400ResponseError=false, failureClass=partial_execution.
Affected workflow and run IDs
Workflow:Daily BYOK Ollama Test (.github/workflows/daily-byok-ollama-test.md / .lock.yml)
Persistence (nearest prior failures, all same signature by run history): 29963539174, 29874295528, 29784505320, 29618245341 — failing daily back to at least 2026-07-14.
Probable root cause
The workflow declares max-daily-ai-credits: 10000, which activates the proxy's maxAiCredits accounting. The BYOK model qwen2.5:0.5b (set via COPILOT_MODEL) is a self-hosted Ollama model and will never appear in the built-in pricing table. Per pkg/workflow/schemas/awf-config.schema.json, when maxAiCredits is active and the model is unrecognized and no apiProxy.defaultAiCreditsPricing fallback is set, the proxy rejects with HTTP 400 unknown_model_ai_credits. No fallback is configured, so the request is rejected before any inference — a config gap, not an Ollama/network fault.
Evidence (agent-stdio.log, run 30050463506)
Ollama install/serve/pull//v1/models readiness steps all pass.
3× copilot-harness attempt N failed: exitCode=1 failureClass=partial_execution each with the qwen2.5:0.5b ... no AI credits pricing 400 body.
Trailing `503 for (apiproxy/redacted) lines are post-failure shutdown noise, not the cause.
Proposed remediation
Primary: Add an apiProxy.defaultAiCreditsPricing fallback to the workflow's AWF config. Since Ollama is self-hosted with no real per-token cost, {"input": 0, "output": 0} is the natural rate; any nonzero rate also works if credit accounting should still be exercised.
Alternative: Register qwen2.5:0.5b in the pricing table used by the proxy.
Fix the AI-credits pricing gate for the BYOK path — add
apiProxy.defaultAiCreditsPricingso self-hostedqwen2.5:0.5bstops getting rejected with HTTP 400.The Daily BYOK Ollama Test has failed every daily run for 8+ consecutive days (100% AR). The Ollama setup succeeds (model pulls,
/v1/modelsready); the agent dies at Execute GitHub Copilot CLI because the api-proxy blocks the model on pricing, not connectivity.Sub-issue of #46846 (same
unknown_model_ai_credits400 mechanism, different workflow/model).Problem statement
All three
copilot-harnessattempts fail with an identical HTTP 400 from the api-proxy:Exit code 1 → agent job failure. Output flag
unknown_model_ai_creditsis set;isHTTP400ResponseError=false,failureClass=partial_execution.Affected workflow and run IDs
Daily BYOK Ollama Test(.github/workflows/daily-byok-ollama-test.md/.lock.yml)Probable root cause
The workflow declares
max-daily-ai-credits: 10000, which activates the proxy'smaxAiCreditsaccounting. The BYOK modelqwen2.5:0.5b(set viaCOPILOT_MODEL) is a self-hosted Ollama model and will never appear in the built-in pricing table. Perpkg/workflow/schemas/awf-config.schema.json, whenmaxAiCreditsis active and the model is unrecognized and noapiProxy.defaultAiCreditsPricingfallback is set, the proxy rejects with HTTP 400unknown_model_ai_credits. No fallback is configured, so the request is rejected before any inference — a config gap, not an Ollama/network fault.Evidence (agent-stdio.log, run 30050463506)
/v1/modelsreadiness steps all pass.copilot-harness attempt N failed: exitCode=1 failureClass=partial_executioneach with theqwen2.5:0.5b ... no AI credits pricing400 body.Proposed remediation
apiProxy.defaultAiCreditsPricingfallback to the workflow's AWF config. Since Ollama is self-hosted with no real per-token cost,{"input": 0, "output": 0}is the natural rate; any nonzero rate also works if credit accounting should still be exercised.qwen2.5:0.5bin the pricing table used by the proxy.COPILOT_PROVIDER_BASE_URLpoints at a self-hosted endpoint — this generalizes the fix to any BYOK model (ties to [aw-failures] [aw-fix] P1: Copilotautomodel has no AI-credits pricing — api-proxy returns 400 and fails Smoke Copilot / AI-c [Content truncated due to length] #46846).Success criteria / verification
Daily BYOK Ollama Testrun completes withagentjob success (nounknown_model_ai_credits400).copilot-harnessreaches inference (tokenCount > 0) instead of failing all retries at pricing.qwen2.5:0.5b.Related to [aw-failures] [aw-fix] P1: Copilot
automodel has no AI-credits pricing — api-proxy returns 400 and fails Smoke Copilot / AI-c [Content truncated due to length] #46846