vendor/model
string, a base URL, and a key.
Vendor APIs for open weight models
Model identifiers change between releases. Confirm the current name in the
vendor’s documentation before pinning it.
Your own vLLM or SGLang server
local has no reasoning dialect, so .thinking() sends nothing and prints one
warning. Pass the parameter your server expects directly:
Endpoints behind proxy authentication
Some hosts authenticate with headers rather than a bearer token..headers() is sent on every model request. Clients are cached per
configuration, so changing headers creates a new client rather than mutating a
shared one.
Text-only models
Models without vision reject base64 media and fail the whole request. Turn vision off and attachments stay in the workspace, with a note naming the file so the model can open it with a tool.Set the context window
Compaction starts when the conversation approaches the window, and the default assumes 1M tokens. Set it to the real value or long chats will overflow before compaction triggers.Web search on any model
Native server-side search is Anthropic only. The portable pair works everywhere and needsBRAVE_API_KEY in the container.
MCP on any model
The harness speaks MCP itself, so remote MCP servers work regardless of provider..server_side() is the exception: it hands the server to Anthropic’s connector
and is Anthropic only.
Complete example
oss_agent.py
cycls cost reports real spend.
Troubleshooting
The provider rejects the request with an unknown parameter
The provider rejects the request with an unknown parameter
A reasoning parameter may not exist on that endpoint. Use
.thinking(None) and
add what the server supports with .extra_body().Tool calls never happen
Tool calls never happen
Confirm the endpoint implements OpenAI tool calling. Some community servers
accept the field and ignore it. Test with a single simple tool first.
Long chats fail with a context error
Long chats fail with a context error
Set
.context() to the model’s real window. The loop compacts based on that
number, and the default is 1M.Images are rejected
Images are rejected
Pass
.vision(False) for text-only models.Next
Python reference
Every exported name in one table.