Skip to content

Commit c06248a

Browse files
committed
docs: refresh pdf tool model fallback refs
1 parent 2a5da61 commit c06248a

2 files changed

Lines changed: 20 additions & 1 deletion

File tree

docs/concepts/models.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ Related:
2626

2727
- `agents.defaults.models` is the allowlist/catalog of models OpenClaw can use (plus aliases).
2828
- `agents.defaults.imageModel` is used **only when** the primary model can’t accept images.
29+
- `agents.defaults.pdfModel` is used by the `pdf` tool. If omitted, the tool
30+
falls back to `agents.defaults.imageModel`, then the resolved session/default
31+
model.
2932
- `agents.defaults.imageGenerationModel` is used by the shared image-generation capability. If omitted, `image_generate` can still infer a provider default from compatible auth-backed image-generation plugins. If you set a specific provider/model, also configure that provider's auth/API key.
3033
- Per-agent defaults can override `agents.defaults.model` via `agents.list[].model` plus bindings (see [/concepts/multi-agent](/concepts/multi-agent)).
3134

@@ -50,6 +53,7 @@ subscription** (OAuth) and **Anthropic** (API key or Claude CLI).
5053

5154
- `agents.defaults.model.primary` and `agents.defaults.model.fallbacks`
5255
- `agents.defaults.imageModel.primary` and `agents.defaults.imageModel.fallbacks`
56+
- `agents.defaults.pdfModel.primary` and `agents.defaults.pdfModel.fallbacks`
5357
- `agents.defaults.imageGenerationModel.primary` and `agents.defaults.imageGenerationModel.fallbacks`
5458
- `agents.defaults.models` (allowlist + aliases + provider params)
5559
- `models.providers` (custom providers written into `models.json`)

docs/tools/pdf.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,20 @@ The tool is only registered when OpenClaw can resolve a PDF-capable model config
2323

2424
1. `agents.defaults.pdfModel`
2525
2. fallback to `agents.defaults.imageModel`
26-
3. fallback to best effort provider defaults based on available auth
26+
3. fallback to the agent's resolved session/default model
27+
4. if native-PDF providers are auth-backed, prefer them ahead of generic image fallback candidates
2728

2829
If no usable model can be resolved, the `pdf` tool is not exposed.
2930

31+
Availability notes:
32+
33+
- The fallback chain is auth-aware. A configured `provider/model` only counts if
34+
OpenClaw can actually authenticate that provider for the agent.
35+
- Native PDF providers are currently **Anthropic** and **Google**.
36+
- If the resolved session/default provider already has a configured vision/PDF
37+
model, the PDF tool reuses that before falling back to other auth-backed
38+
providers.
39+
3040
## Input reference
3141

3242
- `pdf` (`string`): one PDF path or URL
@@ -65,6 +75,8 @@ The tool sends raw PDF bytes directly to provider APIs.
6575
Native mode limits:
6676

6777
- `pages` is not supported. If set, the tool returns an error.
78+
- Multi-PDF input is supported; each PDF is sent as a native document block /
79+
inline PDF part before the prompt.
6880

6981
### Extraction fallback mode
7082

@@ -80,6 +92,9 @@ Fallback details:
8092

8193
- Page image extraction uses a pixel budget of `4,000,000`.
8294
- If the target model does not support image input and there is no extractable text, the tool errors.
95+
- If text extraction succeeds but image extraction would require vision on a
96+
text-only model, OpenClaw drops the rendered images and continues with the
97+
extracted text.
8398
- Extraction fallback requires `pdfjs-dist` (and `@napi-rs/canvas` for image rendering).
8499

85100
## Config

0 commit comments

Comments
 (0)