Skip to main content
Use provider ... from openai for OpenAI-compatible HTTP APIs. The provider endpoint must support the /responses API.
secrets {
    api_key: string
}

provider llm from openai {
    endpoint: "https://api.openai.com/v1"
    api_key: secrets.api_key
}

model fast from llm {
    id: "gpt-4.1-mini"
}
For an OpenAI-compatible gateway, change the endpoint and model ID.
provider llm from openai {
    endpoint: "https://dashscope.aliyuncs.com/compatible-mode/v1"
    api_key: secrets.api_key
}

model fast from llm {
    id: "qwen3.6-plus"
}
Agents use the named model profile.
agent reply {
    model: model.fast
    instruction: "Reply to {{ input.message }}."

    output {
        message: string
    }
}