Working config (from_openai + Mode.JSON on factory and AgentConfig)
AtomicAgent takes an Instructor-wrapped client. Default AgentConfig.mode is tools mode and the default model is gpt-5-mini. An OpenAI-compatible Chat Completions host that does not speak tools needs Mode.JSON on both instructor.from_openai(...) and AgentConfig(...). The modes must match. from_provider("openai/...") is the first-party host.
A Chat Completions host whose public catalog is GET https://api.pzero.studio/v1/models (no key) fits if base_url is https://api.pzero.studio/v1.
import instructor
from openai import OpenAI
from atomic_agents import AtomicAgent, AgentConfig, BasicChatInputSchema, BasicChatOutputSchema
client = instructor.from_openai(
OpenAI(api_key="<Bearer key for that host>", base_url="https://api.pzero.studio/v1"),
mode=instructor.Mode.JSON,
)
agent = AtomicAgent[BasicChatInputSchema, BasicChatOutputSchema](
config=AgentConfig(
client=client,
model="deepseek-v4-flash",
mode=instructor.Mode.JSON,
),
)
Keep embeddings off this host.
Working config (
from_openai+Mode.JSONon factory andAgentConfig)AtomicAgenttakes an Instructor-wrapped client. DefaultAgentConfig.modeis tools mode and the default model isgpt-5-mini. An OpenAI-compatible Chat Completions host that does not speak tools needsMode.JSONon bothinstructor.from_openai(...)andAgentConfig(...). The modes must match.from_provider("openai/...")is the first-party host.A Chat Completions host whose public catalog is
GET https://api.pzero.studio/v1/models(no key) fits ifbase_urlishttps://api.pzero.studio/v1.Keep embeddings off this host.