Agents and tools
Channel can supply a text-generation step in an application you control. There is currently no Channel Agent SDK or hosted tool executor.
Application-controlled workflow
- Validate the user’s task locally and collect the minimum relevant context.
- Build a text conversation within the combined byte limit. Keep earlier conversation state in your application.
- Call Channel and check the HTTP status. Read the answer and save the receipt before any follow-up.
- If an application action is needed, validate its arguments and permissions in your own code. Treat generated text as untrusted input.
- Cap steps and spend in the application. Each additional model call creates its own receipt.
Compatibility boundaries
OpenRouter documents client-side function tools, hosted tools, plugins, multi-turn loops and stop conditions. Channel’s text endpoint does not implement tool-call IDs, tool-result messages, sandbox containers, web search plugins or interleaved tool streams. Sending a tools field does not activate any of these behaviours.
Handling an uncertain outcome
If an agent times out after submitting a request, the upstream model may already have run. Record available IDs and inspect the client statement before deciding to resubmit. Avoid unbounded automatic retries on paid requests.
In a function-calling API, the application describes a function and its arguments. The model can request a call. The application checks permissions, runs the function and sends back a result with the matching call ID. Channel currently accepts alternating user and assistant text, without tool-result messages, so applications migrating this loop must handle the lookup themselves.
For example, to answer “When will order A17 arrive?”, have your application verify the caller can access A17 and read the delivery record. If the record says “Estimated delivery 12 June”, send this single message to Channel:
{"model":"gpt-5.4-mini","messages":[{"role":"user","content":"Answer the delivery question using this record. Order A17: estimated delivery 12 June. Keep the date qualified as an estimate."}]}
If the delivery date is the only information needed, the application can display the record directly and skip the paid inference call.
A hosted tool lets a gateway or provider perform work during generation, such as fetching a page, searching the web or consulting another model. Channel exposes no server-tool registry, execution controls or tool-usage receipt. For a question about a current document, retrieve it in your application and pass the relevant excerpt within the 4,096-byte limit. The upstream model receives that excerpt.
Plugins and migration behaviour
Plugins can change how a gateway processes a request, for example by extracting text from a PDF. Channel supports an opt-in context-compression plugin for text history. PDF extraction and workspace plugin defaults are unavailable. Extract the text before sending the question. A valid text request containing an extra plugins or tools field can still produce a billable text answer. A successful response is therefore insufficient evidence that a lookup or transformation ran. Record the lookup result in your application and use Channel’s request ID to link it to the inference receipt.