Sambanova models support
PR implementing SambaNovaModel and allowing access to SambaNovaCloudModels. includes, model, base tests and docs
Hi @jhpiedrahitao, I've never heard of Sambanova. Please can you start by creating an issue and see if we get significant interest from the community, before we consider adding this to pydantic-ai itself.
Alternatively if you want to use or even distribute this without waiting, you can always create a new package, e.g. pyantic-ai-sambanova which has pydantic-ai as a dependency, and exposes SambaNovaModel.
Hi @jhpiedrahitao, I've never heard of Sambanova. Please can you start by creating an issue and see if we get significant interest from the community, before we consider adding this to
pydantic-aiitself.
we've got a number of sambanova provided models at openrouter, and there is support for that already in pydantic-ai
i actually just saw this recent issue, after hearing users ask if it works with our services: https://github.com/pydantic/pydantic-ai/issues/139
would you be open to a quick docs pr adding another example at the end of here?
from openai import AsyncOpenAI
from pydantic_ai import Agent
from pydantic_ai.models.openai import OpenAIModel
client = AsyncOpenAI(
base_url='https://openrouter.ai/api/v1',
api_key='your-api-key',
)
model = OpenAIModel('anthropic/claude-3.5-sonnet', openai_client=client)
agent = Agent(model)
...
we're considering making pydantic-ai the default in our quickstart docs as well, considering a lot of people really love the devx so far
Hi @jhpiedrahitao, I've never heard of Sambanova. Please can you start by creating an issue and see if we get significant interest from the community, before we consider adding this to
pydantic-aiitself.Alternatively if you want to use or even distribute this without waiting, you can always create a new package, e.g.
pyantic-ai-sambanovawhich haspydantic-aias a dependency, and exposesSambaNovaModel.
Hi @samuelcolvin I created the issue here https://github.com/pydantic/pydantic-ai/issues/218
You can find more information here https://sambanova.ai/ also in the issue linked to artificial analysis providers leader board, where you can see SambaNova being on top for several models
@sambarnes definitely happy to add that example to the docs. I also think we could add base_url as a kwarg to OpenAIModel so you can simplify it to just
model = OpenAIModel(
'anthropic/claude-3.5-sonnet',
base_url='https://openrouter.ai/api/v1',
api_key='your-api-key',
)
PR welcome to add that.
Closing as per https://github.com/pydantic/pydantic-ai/issues/218#issuecomment-2543169564