What is CodeLlama Server
litellm_internal_stagingCodeLlama Server is a specialized implementation of LiteLLM designed for coding-related tasks. It provides a consistent OpenAI-compatible interface for multiple LLM providers (Anthropic, TogetherAI, OpenAI, etc.) with several built-in features:
- Model Fallbacks: Automatically switches to backup models (e.g., GPT-4 or Claude-2) if the primary model (e.g., CodeLlama) fails, including support for retries and cooldowns.
- Guardrails: Uses a default system prompt to restrict responses to coding questions only:
system_prompt = "Only respond to questions about code. Say 'I don't know' to anything outside of that." - Consistent I/O: All models are called using the OpenAI format. Text responses are always at
['choices'][0]['message']['content']and stream responses are at['choices'][0]['delta']['content']. - Observability: Integrates with Promptlayer for prompt tracking and provides token usage/spend tracking.
- Caching: Supports in-memory caching and GPT-Cache integration.