OpenCode

Configure llmtap as a custom OpenAI-compatible provider in OpenCode.

Configuration

opencode.json
{"$schema":"https://opencode.ai/config.json","provider":{"llmtap":{"npm":"@ai-sdk/openai-compatible","name":"llmtap","options":{"baseURL":"https://www.llmtap.dev/api/v1","apiKey":"{env:LLMTAP_API_KEY}"},"models":{"gpt-5.6-sol":{"name":"GPT 5.6 Sol"}}}}}
bash
export LLMTAP_API_KEY='sk-live-your-key'

Errors

Set LLMTAP_API_KEY in the environment before starting OpenCode. If models are missing, confirm the model IDs returned by GET /api/v1/models.