Two things to know first:
- Plain chat. Tool calling is not supported, so a request that sends
toolsis rejected with 400. Agent modes in editors and frameworks usually send tools. Use their chat mode. - Slow by API standards. Replies take 15 to 50 s on devnet. Raise client timeouts to 120 s or more.
Python: the openai package
provider, flop) go in extra_body. The flop record of the response is in reply.model_extra["flop"].
JavaScript: the openai package
flop and provider fields are not in the SDK’s types. Add // @ts-expect-error above them, or pass the body through a variable typed as any.
LangChain
Checked against responses recorded from the live API, not with separate paid calls.Vercel AI SDK
Use@ai-sdk/openai-compatible, which calls chat completions. The Responses API is not offered. Checked against recorded responses.
LiteLLM
Not tested against floprouter.Editor tools and chat apps
Tools with a custom chat-completions provider setting take the base URL, key and model id above. Use chat, not agent or edit modes that depend on tool calls. Keep the output limit low, sincemax_tokens sizes the escrow of every request.