Skip to content

fix: expand cost estimation to 20+ models#132

Merged
peaktwilight merged 1 commit intoPwnKit-Labs:mainfrom
Darkroom4364:fix/cost-models-v2
Apr 17, 2026
Merged

fix: expand cost estimation to 20+ models#132
peaktwilight merged 1 commit intoPwnKit-Labs:mainfrom
Darkroom4364:fix/cost-models-v2

Conversation

@Darkroom4364
Copy link
Copy Markdown
Contributor

  • Adds GPT-4.1, o3, Gemini, DeepSeek, Llama, Mistral pricing
  • normalizeModel() strips vendor prefixes
  • Warns on unknown models

@peaktwilight peaktwilight merged commit b43c213 into PwnKit-Labs:main Apr 17, 2026
11 checks passed
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants