Skip to content

v2.20.0: OpenAI-compatible provider profiles

Choose a tag to compare

@lfnovo lfnovo released this 21 Mar 14:31
· 67 commits to main since this release
3cf0116

What's New

OpenAI-compatible provider profiles

New config-driven system for adding OpenAI-compatible providers without writing Python classes. Adding a new provider is now a 6-line config change:

# Built-in profiles work transparently
model = AIFactory.create_language("dashscope", "qwen-plus")
model = AIFactory.create_language("minimax", "MiniMax-M2.5")

# Register your own OpenAI-compatible endpoints
from esperanto import AIFactory, OpenAICompatibleProfile

AIFactory.register_openai_compatible_profile(
    OpenAICompatibleProfile(
        name="together",
        base_url="https://api.together.xyz/v1",
        api_key_env="TOGETHER_API_KEY",
        default_model="meta-llama/Llama-3-70b-chat-hf",
    )
)
model = AIFactory.create_language("together", "meta-llama/Llama-3-70b-chat-hf")

New providers

  • DashScope (Qwen) — Alibaba Cloud's Qwen models (qwen-turbo, qwen-plus, qwen-max)
  • MiniMax — MiniMax models with 204K context (MiniMax-M2.5, MiniMax-M2.5-highspeed)

Bug fix

  • OpenAI-compatible tool calls — Fixed OpenAICompatibleLanguageModel._normalize_response silently dropping tool_calls from API responses

Deprecated

  • DeepSeekLanguageModel and XAILanguageModel direct instantiation — use AIFactory.create_language("deepseek", ...) / AIFactory.create_language("xai", ...) instead. Existing code still works but will emit a DeprecationWarning.

Documentation

  • Added ARCHITECTURE.md with design principles, provider tiers, and decision criteria
  • Rewrote CONTRIBUTING.md with provider acceptance criteria and profile addition guide

See CHANGELOG.md for full details.