Repository navigation
Fix GPT 6.1 Sol pricing propagation to the firewall - #67413
Conversation
Include exact provider-specific catalog pricing in compiled workflows so AWF can enforce AI-credit limits for GPT 6.1 Sol even when its own pricing table lags behind gh-aw. Preserve frontmatter overrides and leave unknown models unchanged. Fixes #67357 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
✅ Test Quality Sentinel completed test quality analysis.
|
|
✅ Design Decision Gate 🏗️ completed the design decision gate check. See the comment below for the result and any generated ADR draft. No ADR enforcement needed: PR #67413 does not have the 'implementation' label and has 0 new lines of code in default business logic directories (threshold: 100).
|
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅
|
|
✅ Ponytail Reviewer completed successfully! Review not performed: the required pre-fetched PR diff artifact is empty.
|
|
✅ PR Code Quality Reviewer completed the code quality review.
|
There was a problem hiding this comment.
🟡 Changes recommended
Parameterized models retain query suffixes during pricing resolution, so supported forms such as gpt-6.1-sol?effort=high still miss firewall pricing.
1 open finding
What changed in this PR
Propagates embedded model pricing into firewall configuration, addressing unknown_model_ai_credits for GPT 6.1 Sol.
Changes:
- Registers exact provider/model pricing resolution during compilation.
- Adds regression tests and cost-management documentation.
- Regenerates affected workflow locks with firewall pricing overlays.
Static review found no permission or network-access regressions; scanners were not independently rerun.
| File | Description |
|---|---|
pkg/workflow/compiler_types.go |
Updates resolver documentation. |
pkg/workflow/compiler_mutators.go |
Exposes resolver configuration. |
pkg/workflow/compiler_model_pricing.go |
Documents catalog pricing propagation. |
pkg/cli/model_costs.go |
Adds exact catalog lookup. |
pkg/cli/model_costs_test.go |
Tests exact matching. |
pkg/cli/compile_compiler_setup.go |
Registers the resolver. |
pkg/cli/compile_compiler_setup_test.go |
Tests firewall propagation and precedence. |
docs/src/content/docs/reference/cost-management.md |
Documents compiled pricing behavior. |
.github/workflows/smoke-copilot.lock.yml |
Adds Copilot pricing overlays. |
.github/workflows/smoke-copilot-arm.lock.yml |
Adds Copilot pricing overlays. |
.github/workflows/smoke-codex.lock.yml |
Adds OpenAI pricing overlays. |
.github/workflows/smoke-ci.lock.yml |
Adds GPT pricing metadata. |
.github/workflows/notion-issue-summary.lock.yml |
Adds OpenAI pricing configuration. |
.github/workflows/hippo-embed.lock.yml |
Adds Copilot pricing configuration. |
.github/workflows/example-permissions-warning.lock.yml |
Adds model pricing configuration. |
.github/workflows/engine-conformance-pydantic-ai.lock.yml |
Adds conformance pricing configuration. |
.github/workflows/engine-conformance-pi.lock.yml |
Adds conformance pricing configuration. |
.github/workflows/engine-conformance-opencode.lock.yml |
Adds conformance pricing configuration. |
.github/workflows/engine-conformance-goose.lock.yml |
Adds conformance pricing configuration. |
.github/workflows/engine-conformance-deepseek-harness.lock.yml |
Adds conformance pricing configuration. |
.github/workflows/engine-conformance-crush.lock.yml |
Adds conformance pricing configuration. |
.github/workflows/engine-conformance-aider.lock.yml |
Adds conformance pricing configuration. |
.github/workflows/codex-github-remote-mcp-test.lock.yml |
Adds OpenAI pricing configuration. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
Request changes
The new pricing propagation still misses supported model spellings and alias-expanded targets, so unknown_model_ai_credits can still fire in valid configurations.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt54 · 97.7 AIC · ⌖ 5.43 AIC · ⊞ 19.9K
Comment /review to run again
Comments that could not be inline-anchored
pkg/workflow/compiler_model_pricing.go:94
This resolver now passes the full model identifier through to the catalog lookup, so supported forms like copilot/gpt-6.1-sol?effort=high still miss pricing injection and can keep failing with unknown_model_ai_credits.
<details><summary>💡 Strip model parameters before resolving pricing</summary>
Other model-validation paths normalize identifiers by cutting off the ?... suffix before comparing them. Doing the same here before the provider split would make parameterized identifiers reuse…
pkg/cli/model_costs.go:149
The new exact lookup only lower-cases and trims, so catalog-equivalent spellings that the rest of gh-aw already normalizes (GPT_6_1_SOL, mixed ./_ separators) will skip the injected pricing and regress back to firewall rejections.
<details><summary>💡 Reuse comparable-model normalization here</summary>
NormalizeComparableModelID is already the repository-wide comparison rule for model identifiers. Applying it in this exact-match path would keep the new compiler overlay consistent with…
There was a problem hiding this comment.
Skills-Based Review 🧠
Applied /diagnosing-bugs and /tdd to the 7 real source files behind this fix (pkg/cli/{model_costs,compile_compiler_setup}{,_test}.go, pkg/workflow/{compiler_model_pricing,compiler_mutators,compiler_types}.go); the other 141 changed files are regenerated .lock.yml artifacts.
📋 Key Themes & Highlights
Key Themes
- One normalization gap (flagged inline):
findExactModelPricingcompares a lowercased/trimmed model string directly against catalog entries, skipping theNormalizeComparableModelIDpass that the fuzzyfindModelPricingapplies. Dot/hyphen/underscore variants of the same model ID will silently miss the new exact-match guardrail. Low risk today since catalog IDs are canonical, but worth a regression test given this is exactly the kind of "looks matched but doesn't" bug the PR is designed to prevent.
Positive Highlights
- ✅ Root cause correctly addressed: wiring
SetModelPricingResolverwithfindExactModelPricingas the new default resolver, rather than only patching symptoms in individual workflows. - ✅
TestCreateAndConfigureCompiler_GPT61SolFirewallPricingis a strong regression test — it exercises engine/provider/model permutations end-to-end throughBuildAWFConfigJSONand confirms frontmatter overrides still win, directly covering the originating bug (unknown_model_ai_credits). - ✅
TestFindExactModelPricingcovers the guardrail boundary well: cross-provider rejection, unknown models, and theautodynamic alias are all exercised. - ✅ Doc update in
cost-management.mdaccurately describes the new behavior without overclaiming scope.
No blocking issues found — approving with one actionable suggestion left as an inline comment.
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · sonnet50 · 154.5 AIC · ⌖ 14.5 AIC · ⊞ 10.1K
Comment /matt to run again
Strip model parameters before pricing lookup, frontmatter override detection, and firewall overlay emission. Reuse provider-scoped comparable model matching after literal matches and cover parameterized IDs, separator-equivalent spellings, override precedence, and unknown models. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Caution agentic threat detected DetailsPotential security threats were detected in the agent output. Review the workflow run logs for details. @copilot address the following outstanding work in one pass:
Push the necessary fixes, reply to each listed review thread and resolve it when addressed. Ignore feedback already answered or resolved. Use the pr-finisher skill and stop when only human review or CI remains; do not trigger CI. Sous-chef head: 5c08462
|
Cover OpenAI and Copilot hyphenated GPT 6.1 Sol identifiers while retaining wrong-provider and unknown-suffix rejection. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…pricing # Conflicts: # .github/workflows/avenger.lock.yml Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Regenerate the Avenger workflow lock from merged sources, preserving upstream engine changes and catalog pricing propagation. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
…to pelikhan-gpt-6-1-sol-pricing # Conflicts: # pkg/cli/model_costs_test.go Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Avoid npx selecting an unpinned alpha formatter when worktree dependencies are missing. Use the installed setup package formatter and fail with npm ci instructions when unavailable. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Merged latest main via make merge-main (93b6523), regenerated the Avenger lock conflict, and integrated the concurrent branch update (19b529e). Hyphen normalization coverage and firewall-propagation tests pass (9cd7ff7); replied to the listed review thread. Formatting, impacted tests, schema freshness, and incremental Go lint pass; pre-existing custom-linter findings still block the local gate. Automated review was unavailable; fallback code review found no issues. CodeQL Actions found no alerts, but Go scanning was incomplete. No CI was triggered. Thread resolution could not be completed: the available API tools expose no resolve operation, gh has no token, and browser access failed; it still needs manual resolution. |

Why
The Schema Consistency Checker failed because AWF rejected
gpt-6.1-solrequests withunknown_model_ai_credits. gh-aw already contains the model's pricing, but compilation did not pass those rates to the firewall's independent pricing table.Fixes #67357
Approach
Register an offline pricing resolver that matches the exact provider and model in gh-aw's embedded catalog. Existing compiler plumbing includes the resolved rates in both
GH_AW_INFO_MODEL_COSTSandapiProxy.providers.Explicit frontmatter pricing remains authoritative. Unknown models and dynamic aliases do not receive guessed or prefix-based rates, and AI-credit limits remain unchanged. The fix applies to concrete catalog models generally, not just GPT 6.1 Sol; the 141 affected workflow lock files were regenerated. Cost-management documentation explains the behavior.
Validation
The standard final gate is not green: it reports existing custom-linter findings in unchanged portions of touched files and encountered a concurrent golangci-lint lock. The broader CLI suite also fails on macOS path/architecture assumptions and unrelated tests. No workflow was dispatched.