mirror of
https://github.com/moltbot/moltbot.git
synced 2026-04-20 21:23:23 +00:00
docs: refresh xai and zai provider refs
This commit is contained in:
@@ -126,7 +126,11 @@ Current bundled examples:
|
||||
normalization, proxy-Gemini thought-signature sanitation, and cache-TTL
|
||||
policy
|
||||
- `zai`: GLM-5 forward-compat fallback, `tool_stream` defaults, cache-TTL
|
||||
policy, binary-thinking/live-model policy, and usage auth + quota fetching
|
||||
policy, binary-thinking/live-model policy, and usage auth + quota fetching;
|
||||
unknown `glm-5*` ids synthesize from the bundled `glm-4.7` template
|
||||
- `xai`: native Responses transport normalization, `/fast` alias rewrites for
|
||||
Grok fast variants, default `tool_stream`, and xAI-specific tool-schema /
|
||||
reasoning-payload cleanup
|
||||
- `mistral`: plugin-owned capability metadata
|
||||
- `opencode` and `opencode-go`: plugin-owned capability metadata plus
|
||||
proxy-Gemini thought-signature sanitation
|
||||
@@ -369,6 +373,12 @@ See [/providers/kilocode](/providers/kilocode) for setup details.
|
||||
- BytePlus: `byteplus` (`BYTEPLUS_API_KEY`)
|
||||
- Example model: `byteplus-plan/ark-code-latest`
|
||||
- xAI: `xai` (`XAI_API_KEY`)
|
||||
- Native bundled xAI requests use the xAI Responses path
|
||||
- `/fast` or `params.fastMode: true` rewrites `grok-3`, `grok-3-mini`,
|
||||
`grok-4`, and `grok-4-0709` to their `*-fast` variants
|
||||
- `tool_stream` defaults on; set
|
||||
`agents.defaults.models["xai/<model>"].params.tool_stream` to `false` to
|
||||
disable it
|
||||
- Mistral: `mistral` (`MISTRAL_API_KEY`)
|
||||
- Example model: `mistral/mistral-large-latest`
|
||||
- CLI: `openclaw onboard --auth-choice mistral-api-key`
|
||||
|
||||
@@ -803,6 +803,13 @@ api.registerProvider({
|
||||
`tool_stream` defaults, binary thinking UX, modern-model matching, and both
|
||||
usage auth + quota fetching; the `tool-stream-default-on` stream family keeps
|
||||
the default-on `tool_stream` wrapper out of per-provider handwritten glue.
|
||||
- xAI uses `normalizeResolvedModel`, `normalizeTransport`,
|
||||
`contributeResolvedModelCompat`, `prepareExtraParams`, `wrapStreamFn`,
|
||||
`resolveSyntheticAuth`, `resolveDynamicModel`, and `isModernModelRef`
|
||||
because it owns native xAI Responses transport normalization, Grok fast-mode
|
||||
alias rewrites, default `tool_stream`, strict-tool / reasoning-payload
|
||||
cleanup, fallback auth reuse for plugin-owned tools, forward-compat Grok
|
||||
model resolution, and provider-owned compat patches.
|
||||
- Mistral, OpenCode Zen, and OpenCode Go use `capabilities` only to keep
|
||||
transcript/tooling quirks out of core.
|
||||
- Catalog-only bundled providers such as `byteplus`, `cloudflare-ai-gateway`,
|
||||
|
||||
@@ -317,6 +317,13 @@ API key auth, and dynamic model resolution.
|
||||
`contract-api.ts` seam. Those helpers remain Anthropic-specific because
|
||||
they also encode Claude OAuth beta handling and `context1m` gating.
|
||||
|
||||
Other bundled providers also keep transport-specific wrappers local when
|
||||
the behavior is not shared cleanly across families. Current example: the
|
||||
bundled xAI plugin keeps native xAI Responses shaping in its own
|
||||
`wrapStreamFn`, including `/fast` alias rewrites, default `tool_stream`,
|
||||
unsupported strict-tool cleanup, and xAI-specific reasoning-payload
|
||||
removal.
|
||||
|
||||
The same package-root pattern also backs other bundled providers:
|
||||
|
||||
- `@openclaw/openai-provider`: `api.ts` exports provider builders,
|
||||
|
||||
@@ -48,6 +48,17 @@ OpenClaw now includes these xAI model families out of the box:
|
||||
The plugin also forward-resolves newer `grok-4*` and `grok-code-fast*` ids when
|
||||
they follow the same API shape.
|
||||
|
||||
Fast-model notes:
|
||||
|
||||
- `grok-4-fast`, `grok-4-1-fast`, and the `grok-4.20-beta-*` variants are the
|
||||
current image-capable Grok refs in the bundled catalog.
|
||||
- `/fast on` or `agents.defaults.models["xai/<model>"].params.fastMode: true`
|
||||
rewrites native xAI requests as follows:
|
||||
- `grok-3` -> `grok-3-fast`
|
||||
- `grok-3-mini` -> `grok-3-mini-fast`
|
||||
- `grok-4` -> `grok-4-fast`
|
||||
- `grok-4-0709` -> `grok-4-fast`
|
||||
|
||||
Legacy compatibility aliases still normalize to the canonical bundled ids. For
|
||||
example:
|
||||
|
||||
@@ -72,6 +83,11 @@ openclaw config set tools.web.search.provider grok
|
||||
## Notes
|
||||
|
||||
- OpenClaw applies xAI-specific tool-schema and tool-call compatibility fixes automatically on the shared runner path.
|
||||
- Native xAI requests default `tool_stream: true`. Set
|
||||
`agents.defaults.models["xai/<model>"].params.tool_stream` to `false` to
|
||||
disable it.
|
||||
- The bundled xAI wrapper strips unsupported strict tool-schema flags and
|
||||
reasoning payload keys before sending native xAI requests.
|
||||
- `web_search`, `x_search`, and `code_execution` are exposed as OpenClaw tools. OpenClaw enables the specific xAI built-in it needs inside each tool request instead of attaching all native tools to every chat turn.
|
||||
- `x_search` and `code_execution` are owned by the bundled xAI plugin rather than hardcoded into the core model runtime.
|
||||
- `code_execution` is remote xAI sandbox execution, not local [`exec`](/tools/exec).
|
||||
|
||||
@@ -66,6 +66,9 @@ OpenClaw currently seeds the bundled `zai` provider with:
|
||||
|
||||
- GLM models are available as `zai/<model>` (example: `zai/glm-5`).
|
||||
- Default bundled model ref: `zai/glm-5`
|
||||
- Unknown `glm-5*` ids still forward-resolve on the bundled provider path by
|
||||
synthesizing provider-owned metadata from the `glm-4.7` template when the id
|
||||
matches the current GLM-5 family shape.
|
||||
- `tool_stream` is enabled by default for Z.AI tool-call streaming. Set
|
||||
`agents.defaults.models["zai/<model>"].params.tool_stream` to `false` to disable it.
|
||||
- See [/providers/glm](/providers/glm) for the model family overview.
|
||||
|
||||
Reference in New Issue
Block a user