Repository navigation
feat: activate canonical pricing fallback sources - #11117
Conversation
Use generated maintained rates and governed backend-scoped OpenRouter imports. Preserve native legacy compatibility policy and verify packaged accounting paths. Co-authored-by: Copilot App <[email protected]>
Documentation PreviewDocumentation has been built for this PR. To view locally:
Built from commit bc5f9e0 |
There was a problem hiding this comment.
🟡 Changes recommended
The new projection is missing from both workflow safe-output allowlists, causing the projection-coverage test to fail and preventing maintenance proposals from including the required generated output.
1 open issue
What changed in this PR
This PR activates canonical fallback pricing for AWF’s shared AI-credit resolver, replacing legacy guard lookups while keeping pricing separate from execution eligibility.
Changes:
- Uses generated maintained rates, scoped OpenRouter imports, and explicit native compatibility associations.
- Extends compiler validation, packaged assets, and provider-free HTTP/WebSocket accounting coverage.
- Documents intentional charge changes, narrowed coverage, and unchanged unpriced-request behavior.
| File | Description |
|---|---|
shared/model-information/target.generated.json |
Updates the staged target revision. |
shared/model-information/sources/pricing-reference.json |
Declares native compatibility policy and associations. |
shared/model-information/manifest.generated.json |
Updates compiler version and catalogue revision. |
shared/model-information/catalog.generated.json |
Updates the catalogue revision. |
shared/model-information/baseline-to-target.generated.json |
Updates the staged comparison revision. |
scripts/model-information/publication.test.ts |
Includes the fallback projection in publication fixtures. |
scripts/model-information/maintain.cjs |
Adds the fallback projection to maintenance validation. |
scripts/model-information/compile.test.ts |
Tests active projections and unsupported tariff rejection. |
scripts/model-information/compile.cjs |
Generates scoped imports and native compatibility pricing. |
scripts/ci/smoke-pricing-resolution.cjs |
Expands charge, scope, tier, and budget smoke checks. |
docs/model-catalogue-publication.md |
Explains activation, charge deltas, and limitations. |
docs/adr/0004-model-information-management.md |
Records the canonical fallback migration. |
containers/api-proxy/token-tracker.copilot-sdk-model.test.js |
Makes Copilot accounting fixtures provider-explicit. |
containers/api-proxy/server.websocket.test.js |
Uses explicitly associated native pricing for budget checks. |
containers/api-proxy/models-dev-catalog.js |
Labels the adapter as historical in comments. |
containers/api-proxy/model-metadata-characterization.test.js |
Updates provider-scoped fallback expectations. |
containers/api-proxy/guards/pricing-resolution.test.js |
Tests scoped matching, tiers, and revision metadata. |
containers/api-proxy/guards/ai-credits-guard.test.js |
Updates provider scope and accounting expectations. |
containers/api-proxy/guards/ai-credits-guard.js |
Switches active fallback lookups to canonical adapters. |
containers/api-proxy/Dockerfile |
Ships the generated fallback pricing asset. |
containers/api-proxy/catalogue-proxy.test.js |
Exercises packaged accounting with compiler-generated fixtures. |
containers/api-proxy/catalogue-pricing.js |
Adds maintained and provider-scoped imported pricing adapters. |
containers/api-proxy/body-handler.test.js |
Makes credit-warning fixtures provider-explicit. |
containers/api-proxy/ai-credits-pricing.js |
Updates comments to direct active rate authoring to canonical sources. |
Review effort: Max (auto)
| 'shared/model-information/baseline-to-target.generated.json', | ||
| 'src/model-information.compat.generated.json', | ||
| 'containers/api-proxy/model-information.pricing.generated.json', | ||
| 'containers/api-proxy/model-information.fallback-pricing.generated.json', |
There was a problem hiding this comment.
Added the fallback-pricing projection to both safe-output allowlists and regenerated the workflow lock. Commit: fb39172.
|
@copilot address review feedback |
Addressed the review feedback and published the fix in |
|
⏳ Copilot review left inline comments. @lpcox To proceed:
|
✅ Coverage Check PassedOverall Coverage
📁 Per-file Coverage Changes (8 files)
Coverage comparison generated by |
|
🚀 Security Guard has started processing this pull request |
|
Chroot tests passed! Smoke Chroot - All security and functionality tests succeeded.
|
|
Smoke Cloud Hypervisor completed. Cloud Hypervisor + Copilot passed.
|
|
📡 Smoke OTel Tracing is starting OTel tracing validation... |
|
🪪 Smoke Copilot BYOK AOAI (Entra) is testing Azure OpenAI BYOK (Entra / GitHub OIDC) mode on this pull request... |
|
✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟
|
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤
|
|
✅ Smoke Claude passed
|
|
✅ Smoke Copilot BYOK completed. Copilot BYOK mode operational. 🔓
|
|
✅ Build Test Suite completed successfully!
|
|
🔑 Smoke Copilot BYOK AOAI (api-key) is testing Azure OpenAI BYOK (api-key) mode on this pull request... |
|
🛡️ Smoke Copilot Network Isolation confirmed the egress allowlist is enforced. ✅
|
|
💎 Smoke Gemini is crystallizing results on this pull request... |
|
🔌 Smoke Services is testing service connectivity for this pull request... |
Smoke Test: Copilot BYOK (Direct Mode)✅ 1. GitHub MCP — PR list matches pre-fetched data Status: PASS — Running in direct BYOK mode (COPILOT_PROVIDER_API_KEY)
|
|
Cloud Hypervisor + Copilot smoke test
Overall: PASS
|
🏗️ Build Test Suite Results
Overall: 7/8 ecosystems passed — FAIL Failure detailsJava (gson, caffeine): .NET note: the first run failed on NuGet's mutex because The
|
Smoke Test: Claude Engine Validation
Overall result: PASS
|
|
Smoke Copilot: PASS
Author: @lpcox
|
|
EGRESS_RESULT allow=pass deny=pass
Overall: PASS — cc @lpcox
|
|
Chroot Version Comparison
Result: Not all tests passed (Node.js mismatch), so the
|

Summary
Follow-up to merged #11113. Activate the remaining canonical fallback inputs without a shadow/parity waiting stage. Relates to #10295 and #10290; neither tracking issue is closed by this PR.
shared/model-information/pricing-resolution.js::resolvePricingauthoritative for source priority, tier selection, accounting and priceability. Replace the active guard's legacy curated/bare-slug imports with the existingcatalogue-pricing.jsadapter.model-information.pricing.generated.json, generated from activeshared/model-information/sources/copilot-*.jsonrecords. All 42 Copilot rate records and both long-context tiers are unchanged; notarget.jsontariff, promotion or successor is activated.model-information.fallback-pricing.generated.jsonfrom the governed import and explicit native compatibility associations. Include it in Docker, npm packaging and updater proposal validation. No independently authored price table or new runtime loader.openrouterplus full publisher-qualified wire IDs. Publisher namespaces are not native billing backends. Preserve exact-ID precedence and source-local separator/date normalization; namespaces match exactly, ambiguous matches fail explicitly, and remote refresh cannot rename requests, change backends or establish availability.legacy_native_compatibilitypolicy, not verified/current native billing evidence: the existing 12-model reference plus four explicit historical native guard fixtures. Keep original provenance; test dates do not refresh tariffs. No runtime provider adapter is needed to recognize a supported custom pricing-provider identity.Explicit charge and coverage changes
The raw pinned import contains 455 rows: 429 accepted and 26 rejected by the governed importer. For 429 exact qualified OpenRouter IDs, 426 default four-component rate vectors are unchanged. The other three changes and two tier corrections are intentional and documented, not hidden migration details:
openai/gpt-4o-2024-05-13google/gemini-2.5-progoogle/gemini-3.5-flashanthropic/claude-haiku-5.5above 100,000 prompt tokensopenai/gpt-6.1-solabove 272,000 prompt tokensUnreviewed
canonical_slugaliases are not promoted to pricing identities: 39 distinct aliases associated with accepted rows no longer resolve after retained normalization. In particular,openai/gpt-4-turbo:batchremains priced but cannot assign its batch rate to the baseopenai/gpt-4-turboID. Same-slug prices are no longer borrowed by Copilot, native APIs, arbitrary custom/compatible backends or omitted providers. Additional native coverage requires explicit source association/evidence, not manufacturer inference.Unpriced behavior is unchanged: concrete unpriced requests warn and can proceed; their usage is excluded from AI-credit totals, so enforcement can undercount spending. This is not execution admission. Explicit operator/configured tariffs or configured default pricing remain available. Missing cache-read prices retain the explicit legacy 10%-of-input policy; missing cache write remains null; genuine zero is distinct from missing/null required components. Nonrepresentable imported prices error rather than becoming free.
Validation
npm run models:generateandnpm run models:check— passed; canonical revisionb50272501bad3e9a6d687bfdf3940b0d0e72996084240a82bab525f0627f023c.npm run build,npm run type-checkand pre-commitnpm run lint— passed. Lint reports existing warnings, zero errors.git diff --check— passed.No live provider inference, workflow dispatch, extra container/guest/VM runs or merge was performed. Automatic PR CI is expected.
Remaining limitations
Exact-decimal accounting remains next. Generalized compatible assembled tariffs, all promotions/successors/non-token charges, broader reasoning/export migrations, feed harness constraints and runtime/VM/compiler-overlay redesign are out of scope. Imported rates are pinned fallback evidence, not current native tariffs or availability assertions. This does not complete Phase 5 or the parent migration.
See
docs/model-catalogue-publication.mdand ADR 0004 for the source-authority path, detailed deltas and limitations.Implementation head:
84819819bec3abb6825f0548e766bb8eba32c45a.