llama-stack-mirror/llama_stack/providers/registry
Ashwin Bharambe 63e6acd0c3
feat: add (openai, anthropic, gemini) providers via litellm (#1267)
# What does this PR do?

This PR introduces more non-llama model support to llama stack.
Providers introduced: openai, anthropic and gemini. All of these
providers use essentially the same piece of code -- the implementation
works via the `litellm` library.

We will expose only specific models for providers we enable making sure
they all work well and pass tests. This setup (instead of automatically
enabling _all_ providers and models allowed by LiteLLM) ensures we can
also perform any needed prompt tuning on a per-model basis as needed
(just like we do it for llama models.)

## Test Plan

```bash
#!/bin/bash

args=("$@")
for model in openai/gpt-4o anthropic/claude-3-5-sonnet-latest gemini/gemini-1.5-flash; do
    LLAMA_STACK_CONFIG=dev pytest -s -v tests/client-sdk/inference/test_text_inference.py \
        --embedding-model=all-MiniLM-L6-v2 \
        --vision-inference-model="" \
        --inference-model=$model "${args[@]}"
done
```
2025-02-25 22:07:33 -08:00
..
__init__.py API Updates (#73) 2024-09-17 19:51:35 -07:00
agents.py [memory refactor][2/n] Update faiss and make it pass tests (#830) 2025-01-22 10:02:15 -08:00
datasetio.py [remove import *] clean up import *'s (#689) 2024-12-27 15:45:44 -08:00
eval.py [remove import *] clean up import *'s (#689) 2024-12-27 15:45:44 -08:00
inference.py feat: add (openai, anthropic, gemini) providers via litellm (#1267) 2025-02-25 22:07:33 -08:00
post_training.py Pin torchtune pkg version (#791) 2025-01-16 16:31:13 -08:00
safety.py [remove import *] clean up import *'s (#689) 2024-12-27 15:45:44 -08:00
scoring.py [remove import *] clean up import *'s (#689) 2024-12-27 15:45:44 -08:00
telemetry.py optional api dependencies (#793) 2025-01-17 15:26:53 -08:00
tool_runtime.py chore: move embedding deps to RAG tool where they are needed (#1210) 2025-02-21 11:33:41 -08:00
vector_io.py chore: move embedding deps to RAG tool where they are needed (#1210) 2025-02-21 11:33:41 -08:00