Guides

Bring your own model

Binding Anthropic, Google, OpenAI-compatible endpoints and what gets probed.

Handoff has three adapters and no more: native Anthropic, native Google, and one OpenAI-compatible adapter for every provider with a base URL. Bindings are per organisation and the key goes to a secret store, never to the database.

What a binding holds

kind:        'anthropic' | 'google' | 'openai-compat'
baseUrl:     https://…            // for openai-compat
modelId:     free text            // you pick the model
transport:   'direct' | 'runner'  // runner = local model behind the edge runner
caps:        probed on creation, shown, overridable
pricing:     optional $/M tokens for cost accounting
policy:      allowInProduction, dataRetentionDays

Capability probing

On creation the model is asked for one trivial tool call, one JSON-mode response and, if supported, one tiny image. The result is cached and shown on the Providers page. When a model cannot do something natively the agent degrades: strict schema → JSON mode with validation → schema in the prompt with a tolerant parser → a bounded repair loop. Prose where a tool call was expected is a normal branch, not an error.

Prompt caching

Prompts are laid out as a stable prefix (system prompt and tool schema), then history, then the volatile page state last, so providers with prompt caching hit it. Cache-read tokens are recorded per call; if they stay at zero for a provider that supports caching, check the binding.

Evaluation-only endpoints

Some free tiers forbid production use and retain prompts to improve their models. Mark such bindings as not allowed in production; they then cannot serve CI-triggered cycles and are labelled in the UI.

Cost

Every call records input, output and cache-read tokens and the cost in cents from the binding's pricing. Settings → Usage shows the month's totals next to the plan limits.

Bring your own model · Handoff