Skip to content

docs(pages): document local-model setup, tool-calling requirement, and LLM timeouts#11

Open
chethanuk wants to merge 3 commits into
mainfrom
docs/pages-local-models
Open

docs(pages): document local-model setup, tool-calling requirement, and LLM timeouts#11
chethanuk wants to merge 3 commits into
mainfrom
docs/pages-local-models

Conversation

@chethanuk

@chethanuk chethanuk commented Jul 17, 2026

Copy link
Copy Markdown
Owner

Fork-side review PR for upstream alibaba#234 (local-model docs). Two commits so either half can drop:

  • A — FAQ (en/zh/ja faq.md): new "No tool calls parsed" (local models / Ollama) entry + 4th cause bullet in the existing "Max tool requests reached" entry.
  • B — Configuration (en/zh/ja configuration.md): Ollama custom-provider example + new Timeouts subsection (timeout_sec knobs, OCR_LLM_TIMEOUT, 300s default, ocr config set caveat).

Verification (branch-local)

  • npm run typecheck — clean
  • npm run build — compiles; 2 warnings, byte-parity with main's 2 pre-existing bundle-size warnings (zero new)
  • Dev-server render pass on all 6 views (en/zh/ja × faq/configuration), before/after full-page screenshots captured
  • Anchor ids verified against the rendered DOM in all 3 locales — the site slugger is generateHeadingId (strips katakana, single-hyphen runs), not github-slugger; links written to match it
  • curl snippet renders as exactly ONE code block in all 3 locales; byte-identical across locales
  • i18n parity: ### heading count 27/27/27 (faq), 8/8/8 (configuration)
  • https://ollama.com/search?c=tools → 200
  • git show --stat: commit A touches only 3 faq.md, commit B only 3 configuration.md

Side-finding (pre-existing, not touched): several existing in-page links use github-slugger anchors (e.g. #filtering--rules) that don't match the site renderer's ids — broken on the docs site today.

Summary by CodeRabbit

  • Documentation
    • Added setup guidance for using local Ollama models through an OpenAI-compatible custom provider.
    • Documented HTTP timeout defaults, configuration options, override precedence, and configuration examples.
    • Added troubleshooting guidance for “No tool calls parsed” errors and models lacking native tool/function calling.
    • Expanded “Max tool requests reached” guidance with local-model troubleshooting steps.
    • Updated documentation in English, Japanese, and Chinese.

@gemini-code-assist

Copy link
Copy Markdown

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@chethanuk, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 48 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: befecfec-4137-49b4-bbd6-77dc86657e17

📥 Commits

Reviewing files that changed from the base of the PR and between 1a673f9 and 9172a34.

📒 Files selected for processing (7)
  • pages/src/content/docs/en/configuration.md
  • pages/src/content/docs/en/faq.md
  • pages/src/content/docs/ja/configuration.md
  • pages/src/content/docs/ja/faq.md
  • pages/src/content/docs/zh/configuration.md
  • pages/src/content/docs/zh/faq.md
  • pages/src/pages/DocsPage.tsx
📝 Walkthrough

Walkthrough

Documentation in English, Japanese, and Chinese adds Ollama custom-provider setup, HTTP timeout configuration, and troubleshooting guidance for models without native tool-calling support.

Changes

Ollama documentation

Layer / File(s) Summary
Ollama setup and timeout configuration
pages/src/content/docs/{en,ja,zh}/configuration.md
Adds local Ollama provider examples, timeout defaults and precedence, and direct config.json configuration guidance.
Native tool-calling troubleshooting
pages/src/content/docs/{en,ja,zh}/faq.md
Documents the “No tool calls parsed” error, provides a local verification command, and links unsupported native tool calling to “Max tool requests reached.”

Estimated code review effort: 1 (Trivial) | ~5 minutes

Suggested reviewers: lizhengfeng101

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main changes: local-model setup, native tool-calling, and LLM timeout docs.
Description check ✅ Passed The description covers the PR purpose and verification, but it doesn't follow the template sections like Type of Change or Related Issues.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/pages-local-models

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@pages/src/content/docs/en/configuration.md`:
- Around line 108-113: Update the Ollama timeout examples in
pages/src/content/docs/en/configuration.md (108-113),
pages/src/content/docs/ja/configuration.md (106-112), and
pages/src/content/docs/zh/configuration.md (100-105) consistently: either add
valid non-empty model and api_key fields to each complete provider object, or
explicitly state that only timeout_sec should be merged into an existing
provider configuration.

In `@pages/src/content/docs/en/faq.md`:
- Around line 58-61: Update the diagnostic log fences in
pages/src/content/docs/en/faq.md lines 58-61, pages/src/content/docs/ja/faq.md
lines 58-61, and pages/src/content/docs/zh/faq.md lines 53-56 to use the text
language identifier on each opening fence.

In `@pages/src/content/docs/ja/configuration.md`:
- Around line 88-89: Update the “No tool calls parsed” links to use stable
fragments matching the generated headings or explicit stable IDs. Apply this to
pages/src/content/docs/ja/configuration.md lines 88-89 and
pages/src/content/docs/zh/configuration.md lines 84-84; also correct the
self-link fragments in pages/src/content/docs/ja/faq.md lines 199-201 and
pages/src/content/docs/zh/faq.md lines 185-186.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: fdf436bb-dd3a-43b7-ae57-f9ce2dfbae61

📥 Commits

Reviewing files that changed from the base of the PR and between 41620dc and 1a673f9.

📒 Files selected for processing (6)
  • pages/src/content/docs/en/configuration.md
  • pages/src/content/docs/en/faq.md
  • pages/src/content/docs/ja/configuration.md
  • pages/src/content/docs/ja/faq.md
  • pages/src/content/docs/zh/configuration.md
  • pages/src/content/docs/zh/faq.md

Comment thread pages/src/content/docs/en/configuration.md
Comment on lines +58 to +61
```
[ocr] No tool calls parsed for src/foo.go, retrying...
[ocr] Max tool requests reached for src/foo.go.
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Add text language identifiers to all diagnostic log fences.

  • pages/src/content/docs/en/faq.md#L58-L61: change the opening fence to ```text.
  • pages/src/content/docs/ja/faq.md#L58-L61: change the opening fence to ```text.
  • pages/src/content/docs/zh/faq.md#L53-L56: change the opening fence to ```text.
🧰 Tools
🪛 markdownlint-cli2 (0.23.0)

[warning] 58-58: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

📍 Affects 3 files
  • pages/src/content/docs/en/faq.md#L58-L61 (this comment)
  • pages/src/content/docs/ja/faq.md#L58-L61
  • pages/src/content/docs/zh/faq.md#L53-L56
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pages/src/content/docs/en/faq.md` around lines 58 - 61, Update the diagnostic
log fences in pages/src/content/docs/en/faq.md lines 58-61,
pages/src/content/docs/ja/faq.md lines 58-61, and
pages/src/content/docs/zh/faq.md lines 53-56 to use the text language identifier
on each opening fence.

Source: Linters/SAST tools

Comment on lines +88 to +89
["No tool calls parsed"(ローカルモデル / Ollama)](../faq/#no-tool-calls-parsed-ollama)を
参照してください。

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Use stable anchors for localized “No tool calls parsed” links. The current fragments do not consistently match headings containing localized model labels.

  • pages/src/content/docs/ja/configuration.md#L88-L89: replace the fragment with the exact generated slug or an explicit stable ID.
  • pages/src/content/docs/zh/configuration.md#L84-L84: replace the fragment with the exact generated slug or an explicit stable ID.
  • pages/src/content/docs/ja/faq.md#L199-L201: fix the self-link fragment.
  • pages/src/content/docs/zh/faq.md#L185-L186: fix the self-link fragment.
📍 Affects 4 files
  • pages/src/content/docs/ja/configuration.md#L88-L89 (this comment)
  • pages/src/content/docs/zh/configuration.md#L84-L84
  • pages/src/content/docs/ja/faq.md#L199-L201
  • pages/src/content/docs/zh/faq.md#L185-L186
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pages/src/content/docs/ja/configuration.md` around lines 88 - 89, Update the
“No tool calls parsed” links to use stable fragments matching the generated
headings or explicit stable IDs. Apply this to
pages/src/content/docs/ja/configuration.md lines 88-89 and
pages/src/content/docs/zh/configuration.md lines 84-84; also correct the
self-link fragments in pages/src/content/docs/ja/faq.md lines 199-201 and
pages/src/content/docs/zh/faq.md lines 185-186.

Source: Linters/SAST tools

Two changes per locale (en/zh/ja), addressing alibaba#234:

- New "No tool calls parsed" entry under Configuration & startup: the
  symptom loop, the durable rule that the model must support native tool
  calling (deepseek-r1 narrates calls in content and can never work;
  qwen3 works), the Ollama tools-tag search link, and the maintainer's
  curl snippet to verify a model emits structured tool_calls without OCR
  in the loop.
- The existing "Max tool requests reached" entry (where users actually
  land) gains a 4th cause bullet cross-linking the new entry.

Anchors follow generateHeadingId (pages/src/utils/headingId.ts), the
site's actual slugger, and were verified against the rendered DOM in
all three locales. Code blocks are byte-identical across locales per
i18n convention; heading counts stay in parity.
Two additions per locale (en/zh/ja), addressing alibaba#234:

- Custom providers: a copy-paste Ollama example (127.0.0.1:11434/v1,
  protocol openai) with the note that custom providers require a
  non-empty api_key placeholder (resolver has no env fallback for them)
  and a pointer to the FAQ tool-calling rule.
- New Timeouts subsection: providers.<name>.timeout_sec /
  llm.timeout_sec / OCR_LLM_TIMEOUT, the 300s default, and the caveat
  that timeout_sec is not supported by 'ocr config set' (config_cmd has
  no timeout handling) so config.json must be edited directly.

The ja Timeouts heading is タイムアウト(Timeouts) so the site slugger
(which strips katakana) still yields a linkable #timeouts anchor.
Code blocks byte-identical across locales; heading parity kept.
marked percent-encodes non-ASCII hrefs (#超时 renders as #%E8%B6%85%E6%97%B6),
but heading ids are raw text from generateHeadingId, so handleContentClick's
getElementById never matched for CJK anchors: same-page clicks silently
no-oped and cross-page anchor scrolls exhausted their retries at the top of
the page. This affected every pre-existing zh in-page anchor (e.g.
faq 复用已有的环境变量) as well as the zh links added for alibaba#234.

Decode the fragment (with a malformed-input guard) at both lookup sites.
@chethanuk
chethanuk force-pushed the docs/pages-local-models branch from 1a673f9 to 9172a34 Compare July 17, 2026 17:29
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.

1 participant