const OPENCODE_OLLAMA_PROVIDER='ollama';
const OPENCODE_OLLAMA_MODEL='qwen3:0.6b';
const OPENCODE_OLLAMA_BASE_URL='https://ollama.plugincompass.com';
const OPENCODE_OLLAMA_API_KEY='abc123';
const baseUrl=(OPENCODE_OLLAMA_BASE_URL||'https://ollama.plugincompass.com').replace(/\/+$/,'');
const providerCfg={
  options:{ baseURL: baseUrl },
  models: {
    [OPENCODE_OLLAMA_MODEL]: {
      id: OPENCODE_OLLAMA_MODEL,
      name: OPENCODE_OLLAMA_MODEL,
      tool_call: true,
      temperature: true
    }
  }
};
if (OPENCODE_OLLAMA_API_KEY) providerCfg.options.apiKey = OPENCODE_OLLAMA_API_KEY;
const cfg = {
  "$schema": "https://opencode.ai/config.json",
  model: `${OPENCODE_OLLAMA_PROVIDER}/${OPENCODE_OLLAMA_MODEL}`,
  small_model: `${OPENCODE_OLLAMA_PROVIDER}/${OPENCODE_OLLAMA_MODEL}`,
  provider: {
    [OPENCODE_OLLAMA_PROVIDER]: providerCfg
  }
};
console.log(JSON.stringify(cfg, null, 2));
