Skip to content

[AI-assisted] docs(reference): fix broken Anthropic prompt-caching docs URL - #114028

Merged
steipete merged 2 commits into
openclaw:mainfrom
santhiprakash:docs/fix-anthropic-prompt-caching-url
Jul 27, 2026
Merged

steipete merged 2 commits into
openclaw:mainfrom
santhiprakash:docs/fix-anthropic-prompt-caching-url

Conversation

@santhiprakash

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where readers following the Anthropic prompt-caching pricing reference in docs/reference/token-use.md would land on a page that never loads. The link pointed at https://docs.anthropic.com/docs/build-with-claude/prompt-caching, which after Anthropic's docs migration to platform.claude.com now 301-redirects in an infinite loop — browsers surface ERR_TOO_MANY_REDIRECTS.

Why This Change Was Made

Point the reference at the current canonical page: https://platform.claude.com/docs/en/build-with-claude/prompt-caching (HTTP 200). That page still documents cache read/write pricing and the 1h/5m TTL multipliers that the surrounding paragraph cites, so the prose stays accurate.

Scope is intentionally limited to this single link. No other docs.anthropic.com references remain elsewhere in docs/, so there are no sibling surfaces to fix.

User Impact

Readers who click the prompt-caching pricing link now reach Anthropic's live, current prompt-caching documentation instead of a redirect-loop error page.

Evidence

# old URL — 301 then infinite redirect loop (curl -L hits the 50-redirect cap)
$ curl -sS -o /dev/null -L --max-time 20 -A "Mozilla/5.0 (compatible; linkcheck/1.0)" \
    "https://docs.anthropic.com/docs/build-with-claude/prompt-caching"
curl: (47) Maximum (50) redirects followed

# new URL — 200, and the page is genuinely the prompt-caching doc
$ curl -sS -o /dev/null -L --max-time 20 -A "Mozilla/5.0 (compatible; linkcheck/1.0)" \
    -w "%{http_code} %{url_effective}\n" \
    "https://platform.claude.com/docs/en/build-with-claude/prompt-caching"
200 https://platform.claude.com/docs/en/build-with-claude/prompt-caching

The fetched page body contains the expected content (prompt-caching pricing and TTL detail the paragraph references): Prompt caching (×42), TTL (×39), and Cache read/Cache write sections.

Sibling-surface check: grep -rn "docs.anthropic.com" docs/ now returns no matches, confirming this was the only stale Anthropic docs link.

Notes

  • Marked [AI-assisted] per the repo's AI-contribution convention; authored by a single human contributor (Santhi Prakash).
  • Draft: No. Allow edits from maintainers is enabled.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation size: XS triage: low-signal-docs Candidate: docs-only change looks low signal; maintainer review needed. labels Jul 26, 2026
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. labels Jul 26, 2026
@clawsweeper

clawsweeper Bot commented Jul 26, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed July 27, 2026, 4:29 AM ET / 08:29 UTC.

ClawSweeper review

What this changes

The PR replaces the retired Anthropic prompt-caching pricing URL in the token-use reference with the current Claude Platform prompt-caching documentation.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep this PR open for normal maintainer landing review. The one-line documentation correction is focused, the replacement is Anthropic's current official prompt-caching page, and no patch defect or supply-chain concern is evident; GitHub reports the branch cleanly mergeable but behind main, so land from a fresh merge result.

Priority: P3
Reviewed head: 963dabccb3ff3ed8cfbc55a4d5679bb09c9b7903

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, correct-looking docs repair with an appropriate authoritative destination; only the current-base merge refresh remains before landing.
Proof confidence 🌊 off-meta tidepool Not applicable: Real behavior proof is not required because this PR only changes files under docs/.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: Real behavior proof is not required because this PR only changes files under docs/.
Evidence reviewed 4 items Focused documentation change: The PR changes only the external prompt-caching reference immediately following the explanation of Anthropic cache-read, cache-write, and TTL pricing.
Replacement is authoritative and relevant: The target is Anthropic’s official Claude Platform prompt-caching page; it documents prompt caching, pricing, and the standard five-minute and extended one-hour cache durations referenced by the surrounding OpenClaw text.
Current PR state: GitHub context reports the PR as cleanly mergeable but behind main; the head includes a merge from the then-current upstream main, so the final landing action should use a fresh merge result.
Findings None None.
Security None None.

How this fits together

docs/reference/token-use.md explains how OpenClaw users consume model tokens and links readers to provider pricing details. This reference sends readers from OpenClaw’s cache-cost guidance to Anthropic’s authoritative prompt-caching documentation.

flowchart LR
  A[OpenClaw token-use guide] --> B[Anthropic pricing reference]
  B --> C[Claude Platform prompt-caching docs]
  C --> D[Cache pricing and TTL guidance]
  D --> E[Reader configuration decisions]
Loading

Before merge

  • Resolve merge risk (P1) - The PR is behind current main; although GitHub reports it cleanly mergeable, maintainers should review or create the current merge result before landing so the documentation line is still unchanged.
  • Complete next step (P2) - No mechanical repair is needed; the remaining action is a maintainer refresh of the clean merge result and normal landing review.
Agent review details

Security

None.

PR surface

Docs 0. Total 0 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 0 0 0 0
Docs 1 1 1 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 1 1 0

Review metrics

None.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Merge the focused documentation correction after refreshing the merge result against current main, retaining the official Claude Platform URL as the provider-pricing reference.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Merge the focused documentation correction after refreshing the merge result against current main, retaining the official Claude Platform URL as the provider-pricing reference.

Do we have a high-confidence way to reproduce the issue?

Yes—the report supplies exact old and replacement URLs, so a browser or bounded redirect-following request can directly compare the failing reader path with the corrected destination. This review did not need a product-runtime reproduction because the change is documentation-only.

Is this the best way to solve the issue?

Yes. Replacing the retired provider URL with Anthropic’s current official prompt-caching page is the narrowest maintainable fix and preserves the surrounding pricing and TTL guidance.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 9b171190f24e.

Labels

Label justifications:

  • P3: This is a low-risk documentation-link repair that removes reader friction without changing runtime behavior or configuration.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: Real behavior proof is not required because this PR only changes files under docs/.

Evidence

Acceptance criteria:

  • [P1] Confirm the final merge result retains the updated URL in docs/reference/token-use.md.
  • [P1] Open the replacement provider URL or perform a bounded redirect-following HTTP check.

What I checked:

  • Focused documentation change: The PR changes only the external prompt-caching reference immediately following the explanation of Anthropic cache-read, cache-write, and TTL pricing. Public docs: docs/reference/token-use.md. (docs/reference/token-use.md:215, 963dabccb3ff)
  • Replacement is authoritative and relevant: The target is Anthropic’s official Claude Platform prompt-caching page; it documents prompt caching, pricing, and the standard five-minute and extended one-hour cache durations referenced by the surrounding OpenClaw text.
  • Current PR state: GitHub context reports the PR as cleanly mergeable but behind main; the head includes a merge from the then-current upstream main, so the final landing action should use a fresh merge result. (963dabccb3ff)
  • Review routing history: The timeline shows steipete assigned the PR and updated its branch during the current review cycle, indicating active maintainer handling rather than an abandoned contribution. (520e34abd308)

Likely related people:

  • steipete: The PR timeline records assignment and a branch update by this reviewer during the active review cycle, making them the clearest available routing contact for the final merge-result refresh. (role: assigned reviewer and recent branch updater; confidence: medium; commits: 520e34abd308; files: docs/reference/token-use.md)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Refresh the merge result against current main and confirm the one-line documentation diff still applies.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (4 earlier review cycles)
  • reviewed 2026-07-26T04:56:24.071Z sha 541c423b08dd677a67c52ec2a40f7b09ab8d9ed0 :: needs maintainer review before merge. :: none
  • reviewed 2026-07-26T07:48:45.249Z sha 0d5553dbce7044c9b61b7d350dabdd39cd40be38 :: needs maintainer review before merge. :: none
  • reviewed 2026-07-27T07:44:16.485Z sha 520e34abd308025841387b637539b0f41a9569a6 :: needs maintainer review before merge. :: none
  • reviewed 2026-07-27T07:54:47.065Z sha abceb5e :: needs maintainer review before merge. :: none

@steipete steipete self-assigned this Jul 27, 2026
@steipete
steipete force-pushed the docs/fix-anthropic-prompt-caching-url branch from 0d5553d to 520e34a Compare July 27, 2026 07:40
…cs URL

The prompt-caching pricing reference in docs/reference/token-use.md linked to
docs.anthropic.com/docs/build-with-claude/prompt-caching. After Anthropic's
docs migration to platform.claude.com, that URL 301-redirects in an infinite
loop (browsers surface ERR_TOO_MANY_REDIRECTS).

Point it at the current canonical page, which returns HTTP 200 and still
documents the cache read/write pricing and 1h/5m TTL multipliers that the
surrounding paragraph references.
@santhiprakash
santhiprakash force-pushed the docs/fix-anthropic-prompt-caching-url branch from 520e34a to abceb5e Compare July 27, 2026 07:50
@steipete

Copy link
Copy Markdown
Contributor

Maintainer proof complete on exact head 963dabc.

No proof gaps remain; ready for the repo-native prepare/merge lane.

@steipete
steipete merged commit 13bbcab into openclaw:main Jul 27, 2026
47 of 49 checks passed
@steipete

Copy link
Copy Markdown
Contributor

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 28, 2026
…cs URL (openclaw#114028)

The prompt-caching pricing reference in docs/reference/token-use.md linked to
docs.anthropic.com/docs/build-with-claude/prompt-caching. After Anthropic's
docs migration to platform.claude.com, that URL 301-redirects in an infinite
loop (browsers surface ERR_TOO_MANY_REDIRECTS).

Point it at the current canonical page, which returns HTTP 200 and still
documents the cache read/write pricing and 1h/5m TTL multipliers that the
surrounding paragraph references.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. triage: low-signal-docs Candidate: docs-only change looks low signal; maintainer review needed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants