Skip to content

adding together ai models to litellm models json#20319

Merged
Sameerlite merged 2 commits intoBerriAI:mainfrom
FelipeRodriguesGare:add/models
Feb 3, 2026
Merged

adding together ai models to litellm models json#20319
Sameerlite merged 2 commits intoBerriAI:mainfrom
FelipeRodriguesGare:add/models

Conversation

@FelipeRodriguesGare
Copy link
Contributor

Relevant issues

N/A

Pre-Submission checklist

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

  • I have Added testing in the tests/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

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

🐛 Bug Fix

Changes

This fixes function calling in kimi-k2.5 and glm-4.7 for together_ai provider specially in claude code.

@vercel
Copy link

vercel bot commented Feb 3, 2026

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

Project Deployment Actions Updated (UTC)
litellm Ready Ready Preview, Comment Feb 3, 2026 0:58am

Request Review

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 3, 2026

Greptile Overview

Greptile Summary

This PR adds two new Together AI model configurations to model_prices_and_context_window.json:

  • together_ai/zai-org/GLM-4.7: 200K context window, function calling and reasoning support
  • together_ai/moonshotai/Kimi-K2.5: 256K context window, function calling, vision, and reasoning support

The PR description states this fixes function calling in kimi-k2.5 and glm-4.7 for the together_ai provider, specifically in Claude Code.

Key observations:

  • Both models follow existing patterns in the JSON file
  • Pricing and context window specifications appear consistent with similar models
  • GLM-4.7 includes supports_parallel_function_calling like its sibling GLM-4.6, but Kimi-K2.5 does not include this flag despite similar models having it

Missing requirements:

  • PR checklist item "Adding at least 1 test" is not checked - no tests were added in tests/litellm/
  • PR checklist item "My PR passes all unit tests on make test-unit" is not checked

Confidence Score: 4/5

  • This PR is safe to merge with minor risk - it only adds model configuration entries
  • The changes are limited to JSON configuration entries following established patterns. The main concerns are: (1) missing test coverage as required by PR checklist, and (2) potential inconsistency in supports_parallel_function_calling flag. However, the changes are non-breaking and low-risk since they only add new model configurations without modifying existing ones.
  • No files require special attention - the single JSON configuration file is straightforward

Important Files Changed

Filename Overview
model_prices_and_context_window.json Added two Together AI model configurations: zai-org/GLM-4.7 and moonshotai/Kimi-K2.5 with function calling support

Sequence Diagram

sequenceDiagram
    participant User as User/Application
    participant LiteLLM as LiteLLM Core
    participant Config as model_prices_and_context_window.json
    participant TogetherAI as Together AI Provider
    participant API as Together AI API

    User->>LiteLLM: completion(model="together_ai/moonshotai/Kimi-K2.5")
    LiteLLM->>Config: Lookup model configuration
    Config-->>LiteLLM: Return model config (supports_function_calling=true)
    LiteLLM->>TogetherAI: Transform request with tool parameters
    TogetherAI->>API: Forward chat completion with tools
    API-->>TogetherAI: Response with function calls
    TogetherAI-->>LiteLLM: Transform response to OpenAI format
    LiteLLM-->>User: Standardized completion with function calls
    
    Note over User,API: Same flow applies for GLM-4.7 model
    User->>LiteLLM: completion(model="together_ai/zai-org/GLM-4.7")
    LiteLLM->>Config: Lookup model configuration
    Config-->>LiteLLM: Return config (supports_parallel_function_calling=true)
    LiteLLM->>TogetherAI: Transform with parallel tool support
    TogetherAI->>API: Forward request
    API-->>TogetherAI: Response
    TogetherAI-->>LiteLLM: Standardized response
    LiteLLM-->>User: Completion result
Loading

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 file reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

Comment on lines +27130 to +27143
"together_ai/moonshotai/Kimi-K2.5": {
"input_cost_per_token": 5e-07,
"litellm_provider": "together_ai",
"max_input_tokens": 256000,
"max_output_tokens": 256000,
"max_tokens": 256000,
"mode": "chat",
"output_cost_per_token": 2.8e-06,
"source": "https://www.together.ai/models/kimi-k2-5",
"supports_function_calling": true,
"supports_tool_choice": true,
"supports_vision": true,
"supports_reasoning": true
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check if Kimi-K2.5 should include supports_parallel_function_calling

The similar Kimi-K2-Instruct-0905 model includes supports_parallel_function_calling (line 27152), and the newly added GLM-4.7 also has it. Verify if this model should have it too for consistency.

Prompt To Fix With AI
This is a comment left during a code review.
Path: model_prices_and_context_window.json
Line: 27130:27143

Comment:
Check if `Kimi-K2.5` should include `supports_parallel_function_calling`

The similar `Kimi-K2-Instruct-0905` model includes `supports_parallel_function_calling` (line 27152), and the newly added `GLM-4.7` also has it. Verify if this model should have it too for consistency.

How can I resolve this? If you propose a fix, please make it concise.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure is this parameter is supported. I followed the other kimi-k2.5 configuration from moonshotai.

@Sameerlite Sameerlite merged commit be89b38 into BerriAI:main Feb 3, 2026
5 of 8 checks passed
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