Skip to content

feat(cost): add baseten model api pricing entries - #25358

Merged
krrish-berri-2 merged 1 commit into
mainfrom
litellm_baseten-model-api-pricing2
Apr 9, 2026
Merged

feat(cost): add baseten model api pricing entries#25358
krrish-berri-2 merged 1 commit into
mainfrom
litellm_baseten-model-api-pricing2

Conversation

@Sameerlite

Copy link
Copy Markdown
Contributor

Add Baseten Model API pricing entries for Nemotron, GLM, Kimi, GPT OSS, and DeepSeek models with validated model slugs. Include a focused regression test to assert provider and per-token pricing values.

Fixes LIT-2147

Relevant issues

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

  • I have Added testing in the tests/test_litellm/ directory, Adding at least 1 test is a hard requirement - see details
  • My PR passes all unit tests on make test-unit
  • My PR's scope is as isolated as possible, it only solves 1 specific problem
  • I have requested a Greptile review by commenting @greptileai and received a Confidence Score of at least 4/5 before requesting a maintainer review

Delays in PR merge?

If you're seeing a delay in your PR being merged, ping the LiteLLM Team on Slack (#pr-review).

CI (LiteLLM team)

CI status guideline:

  • 50-55 passing tests: main is stable with minor issues.
  • 45-49 passing tests: acceptable but needs attention
  • <= 40 passing tests: unstable; be careful with your merges and assess the risk.
  • Branch creation CI run
    Link:

  • CI run for the last commit
    Link:

  • Merge / cherry-pick CI run
    Links:

Type

🆕 New Feature
🐛 Bug Fix
🧹 Refactoring
📖 Documentation
🚄 Infrastructure
✅ Test

Changes

Add Baseten Model API pricing entries for Nemotron, GLM, Kimi, GPT OSS, and DeepSeek models with validated model slugs. Include a focused regression test to assert provider and per-token pricing values.

Made-with: Cursor
@vercel

vercel Bot commented Apr 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
litellm Ready Ready Preview, Comment Apr 8, 2026 4:41pm

Request Review

@codspeed-hq

codspeed-hq Bot commented Apr 8, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 16 untouched benchmarks


Comparing litellm_baseten-model-api-pricing2 (5c5c899) with main (62757ff)

Open in CodSpeed

@greptile-apps

greptile-apps Bot commented Apr 8, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds pricing entries for 11 new Baseten Model API models — Nemotron, MiniMax, GLM (3 variants), Kimi (3 variants), GPT OSS, and DeepSeek (2 variants) — to both model_prices_and_context_window.json and its backup, along with a focused unit test to verify all entries. The changes also include minor Black-formatter-driven reformatting of existing test assertions.

  • 11 new baseten/ model entries added to both JSON pricing files with litellm_provider, mode, input_cost_per_token, and output_cost_per_token fields
  • New test test_baseten_model_api_pricing_entries in tests/test_litellm/test_cost_calculator.py verifies provider and per-token pricing for all 11 models using the local cost map (no network calls)
  • Existing test assertions reformatted for Black compliance — logic is unchanged
  • None of the new entries include max_tokens/max_input_tokens context window information, which is consistent with the existing pattern for Baseten models in this file

Confidence Score: 5/5

Safe to merge — pure data addition with matching unit test coverage and no logic changes.

All changes are additive: 11 new pricing entries in both JSON files and a new mock test that verifies them. The test uses LITELLM_LOCAL_MODEL_COST_MAP=True so no network calls are made. Existing test assertions were reformatted by Black with no semantic changes. No P0 or P1 issues found.

No files require special attention.

Vulnerabilities

No security concerns identified. Changes are limited to pricing data in JSON files and a read-only unit test against the local cost map.

Important Files Changed

Filename Overview
model_prices_and_context_window.json 11 new baseten model pricing entries added; all follow the existing pattern for baseten (cost-only, no context window fields); pricing values are internally consistent
litellm/model_prices_and_context_window_backup.json Identical 11 entries added as in the primary JSON file; kept in sync correctly
tests/test_litellm/test_cost_calculator.py New mock-only test added for all 11 baseten entries; uses LITELLM_LOCAL_MODEL_COST_MAP=True (no network calls); remaining changes are Black reformatting with no logic changes

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[PR: Add Baseten Pricing Entries] --> B[model_prices_and_context_window.json]
    A --> C[model_prices_and_context_window_backup.json]
    A --> D[tests/test_litellm/test_cost_calculator.py]

    B --> E[11 new baseten/ entries]
    C --> E

    E --> E1[baseten/nvidia/Nemotron-120B-A12B]
    E --> E2[baseten/MiniMaxAI/MiniMax-M2.5]
    E --> E3[baseten/zai-org/GLM-5/4.7/4.6]
    E --> E4[baseten/moonshotai/Kimi-K2.5/Thinking/Instruct]
    E --> E5[baseten/openai/gpt-oss-120b]
    E --> E6[baseten/deepseek-ai/DeepSeek-V3.1/V3-0324]

    D --> F[test_baseten_model_api_pricing_entries]
    F --> G{LITELLM_LOCAL_MODEL_COST_MAP=True}
    G --> H[litellm.get_model_cost_map url=empty]
    H --> I[Assert all 11 entries present with correct provider + pricing]
Loading

Reviews (1): Last reviewed commit: "feat(cost): add baseten model api pricin..." | Re-trigger Greptile

@krrish-berri-2
krrish-berri-2 self-requested a review April 9, 2026 04:39
@krrish-berri-2
krrish-berri-2 merged commit 97f722f into main Apr 9, 2026
102 of 107 checks passed
@krrish-berri-2
krrish-berri-2 deleted the litellm_baseten-model-api-pricing2 branch April 9, 2026 04:40
yuneng-berri added a commit that referenced this pull request Apr 14, 2026
- Add 8 content PRs that merged directly to the release branch outside the listed staging PRs: #23769 (Ramp callback), #25252 (JWT OAuth2 override), #25254 (AWS GovCloud mode), #25258 (batch-limit cleanup), #25334 (router custom_llm_provider), #25345 (Triton embeddings), #25347 (tag-based routing), #25358 (Baseten pricing attribution)
- Add @kedarthakkar to new contributors (first-ever PR via #23769)
- Update RELEASE_NOTES_GENERATION_INSTRUCTIONS: require walking git log range between release tags in addition to staging PRs, and verify new-contributor status per author rather than trusting the GH release body floor
ishaan-berri pushed a commit that referenced this pull request Apr 15, 2026
- Add 8 content PRs that merged directly to the release branch outside the listed staging PRs: #23769 (Ramp callback), #25252 (JWT OAuth2 override), #25254 (AWS GovCloud mode), #25258 (batch-limit cleanup), #25334 (router custom_llm_provider), #25345 (Triton embeddings), #25347 (tag-based routing), #25358 (Baseten pricing attribution)
- Add @kedarthakkar to new contributors (first-ever PR via #23769)
- Update RELEASE_NOTES_GENERATION_INSTRUCTIONS: require walking git log range between release tags in addition to staging PRs, and verify new-contributor status per author rather than trusting the GH release body floor
fzowl pushed a commit to fzowl/litellm that referenced this pull request Jun 24, 2026
Add Baseten Model API pricing entries for Nemotron, GLM, Kimi, GPT OSS, and DeepSeek models with validated model slugs. Include a focused regression test to assert provider and per-token pricing values.

Made-with: Cursor
fzowl pushed a commit to fzowl/litellm that referenced this pull request Jun 24, 2026
- Add 8 content PRs that merged directly to the release branch outside the listed staging PRs: BerriAI#23769 (Ramp callback), BerriAI#25252 (JWT OAuth2 override), BerriAI#25254 (AWS GovCloud mode), BerriAI#25258 (batch-limit cleanup), BerriAI#25334 (router custom_llm_provider), BerriAI#25345 (Triton embeddings), BerriAI#25347 (tag-based routing), BerriAI#25358 (Baseten pricing attribution)
- Add @kedarthakkar to new contributors (first-ever PR via BerriAI#23769)
- Update RELEASE_NOTES_GENERATION_INSTRUCTIONS: require walking git log range between release tags in addition to staging PRs, and verify new-contributor status per author rather than trusting the GH release body floor
fzowl pushed a commit to fzowl/litellm that referenced this pull request Jun 24, 2026
- Add 8 content PRs that merged directly to the release branch outside the listed staging PRs: BerriAI#23769 (Ramp callback), BerriAI#25252 (JWT OAuth2 override), BerriAI#25254 (AWS GovCloud mode), BerriAI#25258 (batch-limit cleanup), BerriAI#25334 (router custom_llm_provider), BerriAI#25345 (Triton embeddings), BerriAI#25347 (tag-based routing), BerriAI#25358 (Baseten pricing attribution)
- Add @kedarthakkar to new contributors (first-ever PR via BerriAI#23769)
- Update RELEASE_NOTES_GENERATION_INSTRUCTIONS: require walking git log range between release tags in addition to staging PRs, and verify new-contributor status per author rather than trusting the GH release body floor
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