Repository navigation
Description
Goal
Make github/gh-aw-firewall the maintained pricing authority. gh-aw should consume AWF-owned, revision-pinned data rather than independently curate prices. Preserve genuine user-authored pricing overrides.
Current problem
The compiler registers findExactModelPricing through SetModelPricingResolver in pkg/cli/compile_compiler_setup.go. resolveModelPricingIfMissing in pkg/workflow/compiler_model_pricing.go merges embedded catalogue prices into ModelCosts for both GH_AW_INFO_MODEL_COSTS and apiProxy.providers.
AWF treats supplied provider pricing as operator overrides. Consequently, automatically injected gh-aw defaults can outrank AWF's maintained/observed pricing and flatten richer facts such as long-context tiers or promotion expiry. This is a source-level authority problem, not a claim of a measured billing incident.
gh-aw also independently maintains pkg/cli/data/models.json and actions/setup/js/models.json, with separate Go/JavaScript pricing resolution and cost calculations.
Available AWF foundation
github/gh-aw-firewall#11512 is merged and its first pricing snapshot has been published successfully. The release-independent pricing v1 pointer identifies an immutable snapshot, SHA-256 digest and reviewed source commit. The package provides an offline seed; compatible data updates do not require an AWF release or package upgrade.
The export preserves exact decimal strings, provider/channel scope, components, long-context thresholds, effective intervals, promotion/successor metadata and provenance. Maintained tariffs, legacy-native compatibility policy and governed OpenRouter imports remain separate authorities. See the consumer/publication contract.
github/gh-aw-firewall#11513 is also merged: source maintenance checks twice daily, proposes reviewed PRs, and publication follows merge. Distribution uses GitHub and SHA-256; signatures are not required.
Implementation sequence
- First focused PR: remove the authority inversion. Stop automatic embedded catalogue defaults from entering
apiProxy.providersas operator pricing. Preserve explicitly authored overrides, including supplied zero rates, and keep any reporting-only metadata distinct from runtime override configuration. - Adopt AWF-owned data. Introduce revision-pinned consumer integration with a generated offline seed and bounded, validated GitHub update/cache path. Verify digest, schema and reviewed-source provenance before replacing accepted data; retain explicit failure status and the last valid revision. Do not introduce another manually maintained price catalogue.
- Migrate reporting and estimates. Prefer AWF-recorded charges and captured pricing revisions for actual requests. Use pinned AWF data for estimates/counterfactuals, clearly labeling estimated versus actual costs. Never retrospectively reprice recorded actual charges using the latest snapshot.
- Reconcile coverage and retire independent maintenance. Migrate supporting evidence for gh-aw-only entries before removing old tables/refresh jobs, including
gpt-5.6-sol-fast,gpt-6.1-sol-fastandmai-code-2-flash. Missing verified coverage must remain explicit, not fabricated or borrowed across providers.
Acceptance criteria
- Compiler regressions distinguish absent defaults from explicit user overrides; automatically sourced prices cannot acquire operator authority.
- Readers preserve decimal precision, strict tier boundaries, start-inclusive/end-exclusive dates and absent/unavailable/zero distinctions. Missing pricing is unknown, not free.
- Copilot tariffs and OpenRouter imports cannot silently price native OpenAI/Anthropic calls or confer model availability/routing compatibility.
- The same supported consumer accepts two compatible pricing revisions without an AWF/package upgrade and retains reproducible historical pins.
- Tests cover integrity/schema rejection, update failure/cache retention, actual-versus-estimated reporting and the compiler override boundary without live provider calls.
Related work
Relates to github/gh-aw#70728, but pricing ownership and removal of automatically injected operator overrides are a distinct migration concern. Downstream pricing adoption is also tracked in github/gh-aw-firewall#10297.
Activity