BerriAI / litellm

Call all LLM APIs using the OpenAI format. Use Bedrock, Azure, OpenAI, Cohere, Anthropic, Ollama, Sagemaker, HuggingFace, Replicate (100+ LLMs)
https://docs.litellm.ai/docs/
Other
10.05k stars 1.12k forks source link

[Bug]: unauthorized error with codestral api #4232

Closed guyomes closed 1 week ago

guyomes commented 1 week ago

What happened?

The codestral api has changed. The free tier doesn't work with "https://api.mistral.ai". The endpoint should now be: "https://codestral.mistral.ai"

The documentation also recommends "If you're building a plugin, or anything that exposes these endpoints directly to the user, and expect them to bring their own API keys, you should also target codestral.mistral.ai" https://docs.mistral.ai/capabilities/code_generation/

Thank you for this great tool.

Relevant log output

No response

Twitter / LinkedIn details

No response

ishaan-jaff commented 1 week ago

doing this today

ishaan-jaff commented 1 week ago

@guyomes we now support codestral API, live on main-latest: https://docs.litellm.ai/docs/providers/codestral

ishaan-jaff commented 1 week ago

@guyomes any chance we can hop on a call ? I'd love to learn how how we can improve litellm for you.

Sharing a link to my cal for your convenience: https://calendly.com/d/4mp-gd3-k5k/litellm-1-1-onboarding-chat If you prefer DMs i'm also sharing a link to my linkedin: https://www.linkedin.com/in/reffajnaahsi/

guyomes commented 1 day ago

Thank you for the patch. Is it also possible to update this file with the new codestral/codestral-latest provider and model: https://github.com/BerriAI/litellm/blob/main/model_prices_and_context_window.json