Lyber
Request access
DocsAgent compatibility

Agents

Markdown

Agent compatibility

What an agent needs from a model API, and how Lyber behaves under agent workloads: long tool loops, large contexts and unattended spending.

Lyber speaks OpenAI Chat Completions with function tools, so most agent frameworks and coding agents connect by changing the base URL, the key and the model. The models are abliterated: they don't add refusals of their own, so your agent follows your instructions, and the guardrails it needs are yours to write.

Coding agents

Each has a setup page with a prompt to copy. The fastest start is Quick setup.

Agent frameworks

FrameworkHow it connectsGuide
OpenAI Agents SDKOpenAIChatCompletionsModel with a Lyber clientBuild an agent
Vercel AI SDK@ai-sdk/openai-compatible, multi-step toolsBuild an agent
LangChain and LangGraphChatOpenAI with a base URLLangChain
Any agent with a custom OpenAI-compatible providerBase URL, key and model IDRequirements

Claude Code can't use Lyber as its model: it needs the Anthropic Messages API, which Lyber doesn't serve. It can still add Lyber to your project.

What an agent gets

Context1,048,576 tokens on both models
OutputUp to 32,768 tokens (MiniMax M3.1 Flash) or 262,144 (DeepSeek V4.1 Flash 1017) per request
ToolsOpenAI function tools: up to 32 per request and 32 calls per reply, tool_choice, streamed arguments
ReasoningPlain text in reasoning_content, which can go back in the history. Effort per request.
FormatsChat Completions, and the Responses API in preview
IdentityThe model you name answers, every time. Lyber never swaps in another model.

Requirements for a custom provider

An agent that lets you add an OpenAI-compatible provider works with Lyber when it can:

  • Point at the base URL https://lyber-paid-acceptance-gateway-production.up.railway.app/v1 and send the key as a bearer token.
  • Use an explicit model ID: minimax-m3.1-flash-abliterated or deepseek-v4.1-flash-1017-abliterated.
  • Leave out the fields Lyber rejects, notably parallel_tool_calls, response_format (JSON mode and structured outputs), n, seed, logprobs and user. They return 400 unsupported_parameter; see Compatibility.
  • Take a context window of 1,048,576 tokens and the model's output limit, if it asks for them.
  • Turn off automatic retries, or retry only when the model was busy (below).
  • Send no more than 32 tools in one request. Agents with many MCP servers can pass that; leave out the servers you don't need.

One request at a time per model

Each model serves one request at a time and keeps no queue. An agent that fires several model calls at once, such as parallel sub-agents on the same model, gets 429 with x-lyber-admission: not-admitted for the extra calls. Those never started and cost nothing: wait the Retry-After seconds and resend.

  • Make model calls one after another. Run the tools themselves in parallel in your own code if you like.
  • Two independent tasks can each use a different model.
  • Each account can have 4 requests open and send 60 a minute across both models.

Unattended spending

  • Give each agent its own key with a monthly limit under Limits. A runaway loop stops at the limit with 402 key_spend_limit_exceeded.
  • Cap each step with max_cost_micro_usdc and size max_tokens to the step. See Spending controls.
  • Lyber never retries or deduplicates. After a timeout or a dropped stream, check GET /v1/credits/requests before the agent sends the step again.

Long steps

A request can generate for up to 180 seconds. Stream long steps to show progress, use a lower reasoning_effort for routine steps, and keep max_tokens to what the step needs.