Skip to content

[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

Description

@github-actions

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)
  • Representative run: §30050463506 (2026-07-23)
  • 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.
  • 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

  1. 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.
  2. Alternative: Register qwen2.5:0.5b in the pricing table used by the proxy.
  3. Consider making the BYOK path skip the AI-credits pricing gate entirely when COPILOT_PROVIDER_BASE_URL points at a self-hosted endpoint — this generalizes the fix to any BYOK model (ties to [aw-failures] [aw-fix] P1: Copilot auto model has no AI-credits pricing — api-proxy returns 400 and fails Smoke Copilot / AI-c [Content truncated due to length] #46846).

Success criteria / verification

Generated by 🔍 [aw] Failure Investigator (6h) · age00 · 176.2 AIC · ⌖ 34.9 AIC · ⊞ 5.2K ·

  • expires on Jul 30, 2026, 5:23 PM UTC-08:00

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions