Skip to main content

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-sonnet-4.6",
    extra_headers={"HTTP-Referer": "https://yourapp", "X-Title": "yourapp"},
)

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

# 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.

See also

Part of the Zeno framework.

Metadata

Release files for zeno-provider-openai 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for zeno-provider-openai 1.1.0
File Size Uploaded
zeno_provider_openai-1.1.0.tar.gz 16.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for zeno-provider-openai 1.1.0
File Interpreter ABI Platform
zeno_provider_openai-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 28.9 kB

Release files / zeno_provider_openai-1.1.0.tar.gz

Download URL zeno_provider_openai-1.1.0.tar.gz
Size 16.8 kB
Tags Source
SHA-256 checksum
How to use checksums
fbeaf422ad4f0a8a41f88884dfd61a294e8d4661f11870b3f5ab8e235811b2d6
BLAKE2b-256 checksum
How to use checksums
8fa00d57fcebffa277a6fcd7d58db4282cc1b0432730fe9cde7b389a9cc73575
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 1, 2026.

Transparency log

Release files / zeno_provider_openai-1.1.0-py3-none-any.whl

Download URL zeno_provider_openai-1.1.0-py3-none-any.whl
Size 12.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c5a7481ff6b44e7d1b69b6be35944eb6b9695e7d211f4d27a5351b319738592c
BLAKE2b-256 checksum
How to use checksums
92ee4be529e918d0c4d40e9a973b794c52b5f6b86b32bbe299ae559fde1af6fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 1, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page