Documentation Index
Fetch the complete documentation index at: https://mintlify.com/alibaba/page-agent/llms.txt
Use this file to discover all available pages before exploring further.
LLMConfig defines every setting that controls how Page Agent communicates with the LLM backend. Page Agent works with any OpenAI-compatible API that supports tool calls — including OpenAI, Anthropic-compatible proxies, Alibaba Cloud Qwen, and local models served by Ollama or LM Studio. These fields are all inherited directly by AgentConfig, so you never need to pass a nested object.
Fields
The base URL of the OpenAI-compatible API endpoint. Do not include a trailing
/chat/completions path — Page Agent appends the correct path automatically.| Provider | Example value |
|---|---|
| OpenAI | https://api.openai.com/v1 |
| Alibaba Cloud Qwen | https://dashscope.aliyuncs.com/compatible-mode/v1 |
| Ollama (local) | http://localhost:11434/v1 |
| LM Studio (local) | http://localhost:1234/v1 |
| Custom proxy | /api/llm-proxy |
The model identifier exactly as the provider expects it. For example
gpt-4.1-mini, qwen3.5-plus, claude-sonnet-5, or qwen3:14b (Ollama tag format).API key for the LLM provider. Omit for local runtimes (Ollama, LM Studio) that do not require authentication, or when authentication is handled via
customFetch.Sampling temperature. Deprecated — many models reject this parameter outright. Use
transformRequestBody to set it only for models you have verified accept it.Number of times the client will retry a failed LLM call before propagating the error. Applies to transient network errors and non-2xx responses.
When
true, the tool_choice field is removed from every request body. Required for LM Studio and some other local models that reject named tool choice with an error similar to "Invalid tool_choice type: 'object'".Intercept and transform the complete request body immediately before it is sent to the provider. Return a modified copy of
body, or mutate the argument in place and return undefined. Use this for provider-specific flags that are not part of the standard OpenAI schema.Replacement
fetch implementation used for all LLM API requests. The response must follow the OpenAI API response format. Common use cases:- Attach session cookies or bearer tokens without exposing them in source code
- Route requests through a backend proxy to keep the API key server-side
- Override CORS headers in a browser extension context
Provider Examples
OpenAI
Alibaba Cloud Qwen
Local Ollama
No API key is needed. The model name must match an Ollama tag you have already pulled.Backend Proxy with Cookie Auth
Route all LLM traffic through your own server so the API key is never exposed to the browser.Claude Prompt Caching via Proxy
UsetransformRequestBody to attach caching hints supported by your proxy or provider.