Repository navigation
fix: warn instead of rejecting models without pricing - #10757
Conversation
Allow unpriced HTTP and WebSocket requests and keep pricing coverage out of fallback and selector eligibility. Warn once per model about unaccounted usage while preserving priced accounting and existing guards. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 2907a2e6-b75a-46bf-9909-9fe32922a753
Documentation PreviewDocumentation has been built for this PR. To view locally:
Built from commit ea61ac7 |
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
The root Jest regression still calls the removed checkUnknownModelRejection export, causing a TypeError instead of verifying the new warning and unaccounted-usage behavior.
1 open issue
What changed in this PR
This PR lets AWF’s API proxy forward requests for models without pricing, warning that unpriced usage is excluded from credit totals. It also removes pricing coverage as a model-selection constraint while preserving existing policy and budget guards.
Changes:
- Replace missing-pricing rejection with once-per-model warnings for HTTP and WebSocket requests.
- Keep unpriced models eligible for fallback, alias, and display-selector resolution.
- Update regression tests and document the accounting limits in specifications, schemas, and TypeScript comments.
| File | Description |
|---|---|
src/types/rate-limit-options.ts |
Document unpriced usage and budget undercounting. |
src/awf-config-schema.json |
Update generated pricing and budget descriptions. |
docs/awf-config.schema.json |
Update canonical pricing and budget descriptions. |
docs/awf-config-spec.md |
Specify warnings, accounting exclusions, and preserved guards. |
containers/api-proxy/websocket-proxy.js |
Wire the renamed pricing check into WebSocket handling. |
containers/api-proxy/websocket-guards.js |
Pass pricing options to the new check. |
containers/api-proxy/server.websocket.test.js |
Cover unpriced upgrades and exhausted budgets. |
containers/api-proxy/server.token-guards.test.js |
Cover HTTP forwarding, warnings, and unpriced accounting. |
containers/api-proxy/server.models.test.js |
Expect alias resolution independent of pricing. |
containers/api-proxy/proxy-request.js |
Update pricing-check imports and dependencies. |
containers/api-proxy/proxy-guards.js |
Connect HTTP guards to the new pricing check. |
containers/api-proxy/model-selector.test.js |
Keep unpriced alias candidates and retries. |
containers/api-proxy/model-selector.js |
Remove the priceability argument from selector resolution. |
containers/api-proxy/model-resolver.js |
Remove pricing-based alias filtering. |
containers/api-proxy/model-resolver-fallback.test.js |
Test fallback selection independent of pricing. |
containers/api-proxy/model-fallback.js |
Select fallbacks without pricing filters. |
containers/api-proxy/model-config.js |
Remove pricing-predicate setup and plumbing. |
containers/api-proxy/guards/model-policy-guard.test.js |
Adapt guard fixtures to the renamed check. |
containers/api-proxy/guards/common-guard-checks.js |
Run pricing warnings without a rejection guard. |
containers/api-proxy/guards/ai-credits-guard.test.js |
Cover warnings, deduplication, and accounting behavior. |
containers/api-proxy/guards/ai-credits-guard.js |
Implement nonblocking pricing checks and explanatory warnings. |
Review effort: Max
| getPendingAiCreditSteeringWarning, | ||
| acknowledgeAiCreditSteeringWarning, | ||
| checkUnknownModelRejection, | ||
| checkModelPricing, |
Co-authored-by: lpcox <[email protected]>
Updated the stale warning assertions to expect |
|
@copilot address review feedback and make sure that 'npm test' completes without any failures |
Updated the AOAI pricing regression to use |
|
✅ Copilot review passed with no inline comments. @lpcox Add the |
✅ Coverage Check PassedOverall Coverage
📁 Per-file Coverage Changes (2 files)
Coverage comparison generated by |
|
Smoke Cloud Hypervisor completed. Cloud Hypervisor + Copilot passed.
|
|
🔌 Smoke Services is testing service connectivity for this pull request... |
|
🛡️ Smoke Copilot Network Isolation confirmed the egress allowlist is enforced. ✅
|
|
✅ Smoke Copilot BYOK AOAI (api-key) completed. Copilot AOAI BYOK (api-key) mode operational. 🔓
|
|
Chroot tests passed! Smoke Chroot - All security and functionality tests succeeded.
|
|
✅ Smoke Copilot BYOK completed. Copilot BYOK mode operational. 🔓
|
|
❌ Security Guard failed. Please review the logs for details.
|
|
✅ Build Test Suite completed successfully!
|
|
Cloud Hypervisor + Copilot smoke test
Overall: PASS
|
Smoke Test: Copilot BYOK (Direct) Mode ✅ PASS✅ GitHub MCP connectivity confirmed (2 merged PRs fetched) Running in direct BYOK mode via api-proxy sidecar.
|
|
chore: upgrade gh-aw workflows to v1.0.1
|
|
OTEL smoke test
|
🔴 Security Review: AI Credits Enforcement BypassThis PR changes model pricing enforcement from rejection to warning, which introduces a critical security regression for AI credit budget enforcement. Issue: Budget Bypass via Unpriced ModelsFiles affected:
What changed:
Security impact:
This allows AI agents to exceed spending limits undetected. Suggested action:
|
|
EGRESS_RESULT allow=pass deny=pass
Overall: PASS — @lpcox
|
Smoke Test
|
|
Smoke Copilot: PRs: "chore: upgrade gh-aw workflows to v1.0.1", "fix: skip stream_options injection for Claude on Vertex"
PASS — @lpcox
|
🏗️ Build Test Suite Results
Overall: 7/8 ecosystems passed — FAIL Java failure: .NET needed
|
Chroot Version Comparison
Node.js differs between host and chroot, so the
|

Summary
maxAiCredits. Emit one warning per model explaining that unpriced usage is excluded from AI-credit totals and budget enforcement may undercount spending.This is a pricing-only change based on
mainat651eda18. It addresses only the missing-pricing rejection reported in github/gh-aw#72353; custom-tool, cache-breakpoint, and detection-alias issues are outside this PR's scope. It does not close that issue.Validation