fix: expand cost estimation to 20+ models#132
Merged
peaktwilight merged 1 commit intoPwnKit-Labs:mainfrom Apr 17, 2026
Merged
Conversation
Contributor
Darkroom4364
commented
Apr 12, 2026
- Adds GPT-4.1, o3, Gemini, DeepSeek, Llama, Mistral pricing
- normalizeModel() strips vendor prefixes
- Warns on unknown models
peaktwilight
added a commit
that referenced
this pull request
Apr 17, 2026
Three small tightening passes on top of #128, #132, #133: tools.ts: expand the API-key env filter beyond the original six providers. Add Mistral, xAI, Cohere, Groq, Together, Perplexity, Fireworks, AI21, DeepSeek, and Hugging Face (HF_TOKEN + HUGGING_FACE_* prefix). Uses the same substring matcher already in place. pty-session.ts: wire the reapIdleSessions() helper that #133 added but never called. Invoke it at the top of createSession() so a new-session request can reclaim slots held by idle forgotten sessions before the concurrent-cap check rejects it. cost.ts: add claude-opus-4-7 pricing ($5 in / $25 out per MTok, per anthropic.com/pricing). 4-7 is the current default Opus and was missing from the table, so any usage would fall through to the unknown-model warning and default rate.
peaktwilight
added a commit
that referenced
this pull request
Apr 17, 2026
Three small tightening passes on top of #128, #132, #133: tools.ts: expand the API-key env filter beyond the original six providers. Add Mistral, xAI, Cohere, Groq, Together, Perplexity, Fireworks, AI21, DeepSeek, and Hugging Face (HF_TOKEN + HUGGING_FACE_* prefix). Uses the same substring matcher already in place. pty-session.ts: wire the reapIdleSessions() helper that #133 added but never called. Invoke it at the top of createSession() so a new-session request can reclaim slots held by idle forgotten sessions before the concurrent-cap check rejects it. cost.ts: add claude-opus-4-7 pricing ($5 in / $25 out per MTok, per anthropic.com/pricing). 4-7 is the current default Opus and was missing from the table, so any usage would fall through to the unknown-model warning and default rate.
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.