Feat/add commandcode provider - #34764
Conversation
Greptile SummaryAdds CommandCode as a chat provider with OpenAI- and Anthropic-compatible routing.
Confidence Score: 3/5The PR is not safe to merge until CommandCode Claude requests are wired to a usable provider configuration and the required authentication behavior. OpenAI-compatible CommandCode requests use the shared HTTP handler, but every Claude request reaches an Anthropic handler that cannot resolve COMMANDCODE and raises before making the upstream request. Files Needing Attention: litellm/main.py, litellm/llms/commandcode/chat/transformation.py
|
| Filename | Overview |
|---|---|
| litellm/main.py | Adds CommandCode dispatch, but the Claude branch cannot resolve or apply its provider configuration. |
| litellm/llms/commandcode/chat/transformation.py | Defines OpenAI and Anthropic endpoint/auth transformations, although the Anthropic configuration is disconnected from runtime dispatch. |
| litellm/litellm_core_utils/get_llm_provider_logic.py | Adds CommandCode prefix detection and OpenAI-compatible credential resolution. |
| litellm/types/utils.py | Registers commandcode in the provider enum. |
| model_prices_and_context_window.json | Adds pricing and capability metadata for two CommandCode models. |
| tests/test_litellm/llms/commandcode/test_commandcode_chat_transformation.py | Covers configuration helpers and the OpenAI runtime path but does not exercise the broken Claude runtime dispatch. |
Reviews (1): Last reviewed commit: "Format CommandCode provider changes" | Re-trigger Greptile
|
|
||
| # Claude models → Anthropic format | ||
| if "claude" in model.lower(): | ||
| response = anthropic_chat_completions.completion( |
There was a problem hiding this comment.
Claude provider config is disconnected
When a commandcode/claude-* request reaches this branch, the Anthropic handler looks up LlmProviders.COMMANDCODE, which has no ProviderConfigManager mapping, and raises Provider config not found before sending the request. The instantiated commandcode_anthropic_config is never used here; additionally, the handler validates with the base AnthropicConfig, producing x-api-key authentication instead of CommandCode's required Bearer header.
Rule Used: Block new LLM Provider integrations if they're ope... (source)
Knowledge Base Used: LLM Provider Adapters
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
TLDR
Problem this solves:
How it solves it:
Relevant issues
Fixes #27582
Linear ticket
Pre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
@greptileaito re-request a review after pushing changes)Screenshots / Proof of Fix
make lintType
🆕 New Feature
Changes
Final Attestation