Skip to content

docs: read attaches image files for vision models - #1025

Merged
edenreich merged 2 commits into
mainfrom
docs/issue-1024-20261021-1346
Oct 21, 2026
Merged

edenreich merged 2 commits into
mainfrom
docs/issue-1024-20261021-1346

Conversation

@inference-gateway-maintainer

Copy link
Copy Markdown
Contributor

Summary

Documents that the CLI's Read tool now attaches an image file for a model that can see images, and sends a text-only model to ImageDecode.

  • cli.md, the Read tool entry: an image file (png, jpg, jpeg, gif, webp, or an extensionless file whose bytes are an image) is attached to the model's next message when the gateway lists image input among the model's modalities, with the result line carrying path and pixel size. A text-only model or a session without an image service gets the error that points at ImageDecode. One example line for each outcome.
  • cli.md, frame sources: the line that said ImageDecode handles arbitrary images now splits by model - Read for a vision model, ImageDecode for a text-only one. The annotator paragraph reframes ImageDecode as the text-only path, and as a text description on top of an image a vision model already sees.
  • cli.md, "Vision-capable models and ImageDecode": adds the on-disk case to the same split.
  • github-action.md, image guidance: the agent still downloads an embedded image with WebFetch, then a vision session model reads it with Read while a text-only one reads it with ImageDecode side-calling vision-model.

Verification

bun run lint:md, bun run format:check and bun run build all pass.

Closes #1024

Generated with Claude Code

Co-authored-by: Eden Reich <16985712+edenreich@users.noreply.github.com>
@inference-gateway-releaser

inference-gateway-releaser Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

🗑️ Preview environment destroyed.

@edenreich

Copy link
Copy Markdown
Contributor

@infer can you fix the drift, in a separate PR?

@inference-gateway-maintainer

inference-gateway-maintainer Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor Author

Model: ollama_cloud/glm-5.3-flash · Action: v0.58.3 · CLI: v0.234.1 · View Job

Todos

  • Investigate what the Docs drift check does and why it fails
  • Create a separate branch from origin/main for the drift fix
  • Restore WebWright docs (reverse 915aee4) and reconcile with live schema
  • Validate (bun test, lint:md, format:check, build), commit and push
  • Open the separate PR

Pull Request

#1026

✅ Infer Result: Success

Everything is committed and pushed, and the working tree is clean. A fresh task generate against the live schema now leaves the committed state byte-identical - exactly what the Docs drift job checks - so PR #1026 will pass it.

The drift is fixed in a separate PR: #1026 (branch docs/restore-webwright-provider, commit 98ef5d6). PR #1025 itself is untouched.

Root cause - the failing "Docs drift" job had nothing to do with this PR's changes. The provider-docs generator fetches the canonical openapi.yaml from inference-gateway/schemas@main and exits when the schema defines a provider that scripts/provider-overrides.json does not. The timeline:

Since WebWright is back in the live schema but absent from the docs overrides, the generator hard-fails with The schema defines provider(s) with no entry in scripts/provider-overrides.json: webwright. Main is affected too - its last green CI run predates the schema restore.

The fix - the docs-side removal in 915aee4 happened purely because upstream had dropped the provider, so with it restored upstream, PR #1026 re-applies what it removed (the inverse of 915aee4): the webwright entry in scripts/provider-overrides.json, the fixture block plus expected provider list in scripts/__fixtures__/openapi.sample.yaml and scripts/generate-provider-docs.test.mjs, and the regenerated provider regions in supported-providers.md, configuration.md, sdks.md, rust-adk.md, and typescript-adk.md. A regeneration against today's live schema confirmed the restored facts still match upstream byte-for-byte (url https://webwright.ai/v1, auth_type: bearer, models + chat endpoints, no vision), so no manual edits were needed beyond un-reverting.

Verification - bun test (12 pass), bun run lint:md, bun run format:check, and bun run build all pass on the branch, and rerunning task generate against the live schemas@main leaves the committed state untouched, which is exactly what the drift job checks - so PR #1026 will pass its Docs drift run.

Heads-up for this PR - the Docs drift check on PR #1025 will stay red until PR #1026 merges and this branch picks up main, because the drift job runs each PR branch as-is. This PR's own changes (cli.md, github-action.md) are unaffected; the failure is purely the upstream WebWright revert/restore churning under every branch.

Model: ollama_cloud/glm-5.3-flash · Action: v0.58.3 · CLI: v0.234.1 · Exit Code: 0 · Duration: 4m 34s

Tokens: 1,205,963 in · 21,235 out · 1,227,198 total (23 requests)

Tool calls: 40 total · 100% success rate

Traces
Session: 1792590960-49f73a74

session (headless, success)                                                                        4m27s
├── chat ollama_cloud/glm-5.3-flash                                                                14.7s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                      14.7s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]    14.7s
│           ╰── POST [inference-gateway, server]                                                   14.7s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                14.7s
├── execute_tool TodoWrite call_hoek5kb6                                                            58µs
├── execute_tool Read call_mdwakqs0                                                                567µs
├── execute_tool Bash call_bzu79p16                                                                 1.3s [error: tool_error]
├── execute_tool Bash call_5t1e6srw                                                                 40ms
├── chat ollama_cloud/glm-5.3-flash                                                                 2.4s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       2.4s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     2.4s
│           ╰── POST [inference-gateway, server]                                                    2.4s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 2.4s
├── execute_tool Bash call_kwq5w2dn                                                                 1.7s
├── execute_tool Read call_cty5m0zz                                                                550µs
├── chat ollama_cloud/glm-5.3-flash                                                                14.8s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                      14.8s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]    14.8s
│           ╰── POST [inference-gateway, server]                                                   14.8s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                14.8s
├── execute_tool Read call_zxl7xp0h                                                                930µs
├── execute_tool Read call_4sbek7y4                                                                740µs
├── execute_tool Bash call_bfqrgm9d                                                                755ms
├── execute_tool Bash call_2k1b1jhw                                                                  9ms
├── chat ollama_cloud/glm-5.3-flash                                                                17.5s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                      17.5s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]    17.5s
│           ╰── POST [inference-gateway, server]                                                   17.5s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                17.5s
├── execute_tool WebFetch call_4aadqrda                                                             84ms
├── execute_tool Read call_olvd9q5q                                                                589µs
├── execute_tool Bash call_xov84vya                                                                 69ms [error: tool_error]
├── chat ollama_cloud/glm-5.3-flash                                                                 3.3s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       3.3s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     3.3s
│           ╰── POST [inference-gateway, server]                                                    3.3s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 3.3s
├── execute_tool Grep call_zw9vf4ys                                                                673µs [error: tool_error]
├── execute_tool Bash call_vtporqab                                                                486ms
├── chat ollama_cloud/glm-5.3-flash                                                                30.8s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                      30.8s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]    30.8s
│           ╰── POST [inference-gateway, server]                                                   30.8s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                30.8s
├── execute_tool Bash call_1g1fgmn0                                                                  5ms
├── execute_tool Bash call_i28ezsio                                                                  9ms
├── chat ollama_cloud/glm-5.3-flash                                                                31.6s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                      31.6s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]    31.6s
│           ╰── POST [inference-gateway, server]                                                   31.6s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                31.6s
├── execute_tool TodoWrite call_clewujak                                                            66µs
├── execute_tool Bash call_4rp8n65v                                                                297ms
├── execute_tool Bash call_hn0cj0wy                                                                  8ms
├── chat ollama_cloud/glm-5.3-flash                                                                 9.8s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       9.8s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     9.8s
│           ╰── POST [inference-gateway, server]                                                    9.8s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 9.8s
├── execute_tool Bash call_cxoifuw6                                                                 10ms
├── chat ollama_cloud/glm-5.3-flash                                                                 4.7s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       4.7s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     4.7s
│           ╰── POST [inference-gateway, server]                                                    4.7s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 4.7s
├── execute_tool TodoWrite call_w7zwdhn0                                                            63µs
├── execute_tool Bash call_2dv540mb                                                                 13ms
├── chat ollama_cloud/glm-5.3-flash                                                                 3.1s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       3.1s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     3.1s
│           ╰── POST [inference-gateway, server]                                                    3.1s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 3.1s
├── execute_tool Bash call_45iygoh5                                                                 1.9s
├── chat ollama_cloud/glm-5.3-flash                                                                 3.6s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       3.6s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     3.6s
│           ╰── POST [inference-gateway, server]                                                    3.6s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 3.6s
├── execute_tool Bash call_purqbi81                                                                 11ms
├── chat ollama_cloud/glm-5.3-flash                                                                 3.0s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       3.0s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     3.0s
│           ╰── POST [inference-gateway, server]                                                    3.0s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 3.0s
├── execute_tool Bash call_1zdt2a88                                                                 11ms
├── chat ollama_cloud/glm-5.3-flash                                                                 4.1s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       4.1s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     4.1s
│           ╰── POST [inference-gateway, server]                                                    4.1s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 4.1s
├── execute_tool TodoWrite call_q04syqvo                                                            59µs
├── execute_tool Bash call_u82ndyzp                                                                 40ms
├── execute_tool Bash call_rcdoibbm                                                                 2.1s
├── execute_tool Bash call_msv0n0mh                                                                 5.5s
├── chat ollama_cloud/glm-5.3-flash                                                                 1.6s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       1.6s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     1.6s
│           ╰── POST [inference-gateway, server]                                                    1.6s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 1.6s
├── execute_tool Bash call_sghlhyo8                                                                35.0s
├── chat ollama_cloud/glm-5.3-flash                                                                20.2s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                      20.2s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]    20.2s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                       20.2s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                20.2s
├── execute_tool Bash call_yaggq5ko                                                                  6ms
├── chat ollama_cloud/glm-5.3-flash                                                                 3.9s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       3.8s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     3.8s
│           ╰── POST [inference-gateway, server]                                                    3.8s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 3.8s
├── execute_tool Bash call_dnlcsgdt                                                                  7ms
├── chat ollama_cloud/glm-5.3-flash                                                                 2.0s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       2.0s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     2.0s
│           ╰── POST [inference-gateway, server]                                                    2.0s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 2.0s
├── execute_tool Bash call_k4icfkca                                                                 13ms
├── chat ollama_cloud/glm-5.3-flash                                                                10.4s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                      10.4s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]    10.4s
│           ╰── POST [inference-gateway, server]                                                   10.4s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                10.4s
├── execute_tool Bash call_roozl703                                                                 2.3s
├── execute_tool Write call_t1szgodn                                                                 2ms
├── chat ollama_cloud/glm-5.3-flash                                                                 1.8s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       1.8s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     1.8s
│           ╰── POST [inference-gateway, server]                                                    1.8s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 1.8s
├── execute_tool Bash call_y7jvtco4                                                                 3.6s
├── chat ollama_cloud/glm-5.3-flash                                                                 9.4s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       9.4s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     9.4s
│           ╰── POST [inference-gateway, server]                                                    9.4s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 9.4s
├── execute_tool Bash call_9ben1wgc                                                                 1.9s
├── chat ollama_cloud/glm-5.3-flash                                                                 2.0s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       2.0s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     2.0s
│           ╰── POST [inference-gateway, server]                                                    2.0s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 2.0s
├── execute_tool Bash call_fupru27z                                                                  8ms
├── chat ollama_cloud/glm-5.3-flash                                                                 4.4s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       4.4s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     4.4s
│           ╰── POST [inference-gateway, server]                                                    4.4s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 4.4s
├── execute_tool TodoWrite call_ux94l4tf                                                            64µs
╰── chat ollama_cloud/glm-5.3-flash                                                                 5.8s
    ╰── POST /v1/chat/completions [inference-gateway, server]                                       5.8s
        ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     5.8s
            ╰── POST [inference-gateway, server]                                                    5.8s
                ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 5.8s
Stats
Tool Calls

╭───────────┬───────┬───────┬────────╮
│ Tool      │ Calls │ Fail% │ Avg    │
├───────────┼───────┼───────┼────────┤
│ Bash      │ 27    │ 7%    │ 2113ms │
│ TodoWrite │ 5     │ 0%    │ 59µs   │
│ Read      │ 5     │ 0%    │ 671µs  │
│ WebFetch  │ 1     │ 0%    │ 85ms   │
│ Grep      │ 1     │ 100%  │ 621µs  │
│ Write     │ 1     │ 0%    │ 2ms    │
╰───────────┴───────┴───────┴────────╯

Token Usage

╭────────────────────────────┬─────────┬────────┬────────────┬─────────┬──────╮
│ Model                      │ Prompt  │ Cached │ Completion │ Total   │ Cost │
├────────────────────────────┼─────────┼────────┼────────────┼─────────┼──────┤
│ ollama_cloud/glm-5.3-flash │ 1205963 │ 922880 │ 21235      │ 1227198 │ -    │
╰────────────────────────────┴─────────┴────────┴────────────┴─────────┴──────╯

Sessions

╭───────────┬──────────┬──────────╮
│ Execution │ Mode     │ Sessions │
├───────────┼──────────┼──────────┤
│ headless  │ headless │ 1        │
╰───────────┴──────────┴──────────╯

Triggered by edenreich · Infer Action · OSS

@edenreich
edenreich merged commit 2605223 into main Oct 21, 2026
1 check passed
@edenreich
edenreich deleted the docs/issue-1024-20261021-1346 branch October 21, 2026 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[DOCS] Read attaches image files for vision models

1 participant