Pi on arc-dind: an aliased model reaches pi empty (`Model "aw-gateway/" not found`)
Analysis
With engine: pi, model: opus (or copilot/opus) and runner.topology: arc-dind, the alias resolves correctly, but pi is launched without a model:
[gh-aw/pi-models-json] model resolution: engine=pi role=main configured=opus resolved=claude-opus-5 provider=copilot status=resolved
Error: Model "aw-gateway/" not found. Use --list-models to see available models.
For an alias, pkg/workflow/pi_engine.go builds --model "aw-gateway/$(cat + piResolvedModelFile + )" with piResolvedModelFile = "/tmp/gh-aw/pi-model". In the compiled lock, that path is rewritten to ${RUNNER_TEMP}/gh-aw/pi-model. pi_models_json.cjs writes to process.env.GH_AW_PI_MODEL_FILE || "/tmp/gh-aw/pi-model", and the lock never sets GH_AW_PI_MODEL_FILE, so the file goes to /tmp/gh-aw/pi-model. On arc-dind those are different directories, so pi reads an empty file. pi_runtime.cjs reads the same default.
An exact ID (copilot/claude-opus-5) is compiled straight into --model aw-gateway/claude-opus-5 and works. Seen on v0.93.2. v0.93.5 and v1.0.1 compile the same launch line, with no GH_AW_PI_MODEL_FILE, and main (6cb1976022) has the same code.
Implementation plan
- In
pkg/workflow/pi_engine.go, whenpiModelIsAlias, exportGH_AW_PI_MODEL_FILEset to the same path the launch line reads, next toGH_AW_PI_MODEL_ID. The compiler's/tmp/gh-aw→${RUNNER_TEMP}/gh-awrewrite then applies to the writer,pi_runtime.cjsand the reader alike. - Add a test in
pkg/workflow/pi_engine_test.go: for an aliased model, the compiled step setsGH_AW_PI_MODEL_FILEto exactly the path inside the--model "aw-gateway/$(cat …)"substitution.
Acceptance: an arc-dind pi workflow with model: opus launches pi with the resolved model (for example aw-gateway/claude-opus-5).
@pelikhan is there something wrong in this request? I see the PR got closed