Skip to main content

OpenAI-compatible Chat Completions provider for Zeno (OpenAI, OpenRouter, LiteLLM, Azure v1, Ollama, vLLM).

Project description

zeno-provider-openai

OpenAI-compatible Chat Completions provider for Zeno. One adapter covers every vendor that speaks the OpenAI REST shape: OpenAI, OpenRouter, LiteLLM, Azure v1, Ollama, vLLM, and anything that clones the wire protocol.

Install

uv add 'zeno-framework[openai]'

Usage

from zeno.agent import Agent
from zeno.app import ZenoApp
from zeno.channels.cli.channel import CliChannel
from zeno.providers.openai import OpenAIProvider

app = ZenoApp(
    agent=Agent(name="root", instructions="..."),
    channels=[CliChannel()],
    provider=OpenAIProvider(
        api_key="sk-...",
        base_url="https://api.openai.com/v1",
        model="gpt-5.1",
    ),
)

Swap providers without changing your Agent:

# OpenRouter
OpenAIProvider(
    api_key="...",
    base_url="https://openrouter.ai/api/v1",
    model="anthropic/claude-4.7-sonnet",
    extra_headers={"HTTP-Referer": "https://yourapp", "X-Title": "yourapp"},
)

# LiteLLM
OpenAIProvider(api_key="...", base_url="http://litellm:4000/v1", model="anthropic/claude-4.7-sonnet")

# Azure v1 (/openai/v1/ surface)
OpenAIProvider(api_key="...", base_url="https://YOUR.openai.azure.com/openai/v1", model="gpt-5.1")

# Ollama — non-streaming when tools are present (known upstream bug)
OpenAIProvider(api_key="ollama", base_url="http://localhost:11434/v1", model="llama4",
               disable_stream_with_tools=True)

Compatibility matrix

Target Streaming Tools (native) Tools-with-streaming Notes
OpenAI Yes Yes Yes Reference
OpenRouter Yes Yes Yes Optional HTTP-Referer / X-Title headers
LiteLLM Yes Yes Yes Handles model translation server-side
Azure v1 Yes Yes Yes Use the v1 surface (/openai/v1/...)
Ollama Yes Yes No (upstream) Pass disable_stream_with_tools=True
vLLM Yes Yes Yes Aggregator defaults missing type to "function"

What this provider does not support

  • built_in_tools (Claude Agent SDK native tools — no OpenAI equivalent)
  • sub_agents (Claude Agent SDK dispatch contract)
  • permission_mode (Claude-specific)

Configure those on ClaudeSDKProvider. Zeno's ZenoApp.start() catches mismatches.

Part of the Zeno framework.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zeno_provider_openai-1.0.0rc1.tar.gz (16.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zeno_provider_openai-1.0.0rc1-py3-none-any.whl (12.0 kB view details)

Uploaded Python 3

File details

Details for the file zeno_provider_openai-1.0.0rc1.tar.gz.

File metadata

  • Download URL: zeno_provider_openai-1.0.0rc1.tar.gz
  • Upload date:
  • Size: 16.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for zeno_provider_openai-1.0.0rc1.tar.gz
Algorithm Hash digest
SHA256 9d4ead019154b2d259a4f91fd5200865a3f6a7cd7e0256a6dce57b02c8a2f159
MD5 58567ee957a069eacd6efc1c81110452
BLAKE2b-256 c1adadc03f7e10e64b11d77bc132194cccfc49adfc0235121d5933902e52252e

See more details on using hashes here.

Provenance

The following attestation bundles were made for zeno_provider_openai-1.0.0rc1.tar.gz:

Publisher: publish.yml on nkootstra/zeno

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file zeno_provider_openai-1.0.0rc1-py3-none-any.whl.

File metadata

File hashes

Hashes for zeno_provider_openai-1.0.0rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 ae1551bedaf379a1e73c431cfc1c52ed87b73d6bf0dcb4cbfa2e31675411c9d6
MD5 ad43037751a3320f07af563168b10dd6
BLAKE2b-256 c7f33c98be0bc779dbffac35ba89d29e9045922820ae29abf61518bf831db7ab

See more details on using hashes here.

Provenance

The following attestation bundles were made for zeno_provider_openai-1.0.0rc1-py3-none-any.whl:

Publisher: publish.yml on nkootstra/zeno

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page