Repository navigation
Cap the model catalog at $0.02 per decision - #62
Merged
Merged
Conversation
/api/generate-action is open to anyone, so a model priced past the ceiling is never offered or accepted. Costs use a measured 4k-in, 100-out decision. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TQLQU5xCLETVSjUSNR4D2s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TQLQU5xCLETVSjUSNR4D2s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TQLQU5xCLETVSjUSNR4D2s
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
/api/generate-actionis open to anyone (no auth, CORS*), so anyone can sendprovider: "gpt-5.2-pro"in a loop. The client-sidemaxInstancescap does not stop that. With this change the catalog itself is the spending limit: a model over the ceiling is not inMODELS, so the picker does not offer it and the endpoint rejects it.Rule
scripts/refresh-models.tsdrops any model whose cost for one decision is over $0.02. The decision size is measured: a Dominion buy decision used 3.2k–5.3k input and 36–74 output tokens (nova-micro, opus-5.5-fast, gpt-6.1-sol-fast), and o3-pro used 253. The estimate uses 4k in and 100 out. The filter runs before the class collapse, the same as the denials.Removed
gpt-5.2-pro, o3-pro, gpt-6-astra and -fast (≈ $0.08 per decision), gpt-5.5-fast, claude-opus-5.5-fast, kimi-k3-fast, gpt-5.5. The gateway also dropped deepseek-v4.1-flash-fast on its own side. The collapse brought back gpt-5.4 and gpt-5.2-fast, which cost $0.012 and $0.017.
Pro preset: claude-opus-5.5-fast → claude-sonnet (5.5), kimi-k3-fast → kimi-k3. The stale
gpt-5.5maxInstances quirk is gone.Evidence
gpt-5.2-prosent to the local endpoint now fails the request schema ("Invalid request").Dead code
I deleted 1 item: the
gpt-5.5maxInstances quirk, whose model is now gone.🤖 Generated with Claude Code
https://claude.ai/code/session_01TQLQU5xCLETVSjUSNR4D2s