OpenCode Chat Model icon

OpenCode Chat Model

Use OpenCode self-hosted AI coding agent as a chat model

OpenCode Chat Model

AI-generated

Summary

Send chat prompts to a specific OpenCode agent and model to generate AI-assisted coding responses.

Inputs

  • Agent (required) — Select the OpenCode agent to handle the chat interaction.
  • Model Provider (required) — Choose the model provider to use for generating responses.
  • Model ID — Optionally specify the particular model from the selected provider.
  • Options — Additional request parameters including Base URL override (to specify the service endpoint), Temperature (controls response randomness), and Maximum Tokens (caps the length of generated output, with -1 meaning uncapped).

Output shape

a single record containing the AI-generated chat model response

The response is obtained via the chosen agent and model with applied options; the maximum tokens parameter limits output length when set to a positive value, otherwise unlimited.

Discussion