Skip to content

Update documentation for Anthropic, Google, OpenAI, and Agent integra… - #35

Merged
Iamsdt merged 1 commit into
mainfrom
fix/antropic-caching-issue
Nov 21, 2026
Merged

Iamsdt merged 1 commit into
mainfrom
fix/antropic-caching-issue

Conversation

@Mothilal-M

Copy link
Copy Markdown
Member

Summary

Updates the Anthropic, OpenAI, Google and Agent reference docs to match how 10xGraph now handles Anthropic prompt caching and provider-specific keyword arguments.

What changed

Anthropic prompt caching (anthropic.md)

  • Prompt caching is now documented as on by default. It used to be described as opt-in through anthropic_cache=True.
  • Describes the two markers: a breakpoint on the last system block (or the last tool when there is no system prompt), plus top-level automatic caching that moves forward with the conversation.
  • anthropic_cache=False turns caching off. anthropic_cache={"type": "ephemeral", "ttl": "1h"} sets the TTL for both markers.
  • Removes the fixed "~1024 token minimum", since the minimum depends on the model. Adds a note on cost: a write costs 1.25x for the 5 min TTL and reads are cheap.
  • Says how to check hits through Message.usages.cache_read_input_tokens and the DEBUG log.
  • If cache_control is set anywhere (top-level kwarg, system block or tool), 10xGraph adds no breakpoints of its own.
  • New Provider-specific settings section (service_tier, inference_geo, metadata, cache_control).

Kwarg forwarding (OpenAI, Google, Agent reference)

  • Documents the new rule: extra Agent(...) / ReactAgent(...) kwargs are forwarded only if the installed provider SDK defines them:
    • Anthropic: checked against messages.create / messages.stream
    • OpenAI: checked against responses.create / chat.completions.create (and their parse variants)
    • Google: checked against the fields of types.GenerateContentConfig
  • Unknown keys are dropped, with a warning that names the key and the provider.
  • New SDK parameters work after an SDK upgrade, with no 10xGraph release needed.
  • The check is by name only, so values the API rejects still return the provider's error. This also applies to names that mean different things on different providers (metadata, service_tier).
  • agent.md: new ### Provider-specific settings section with a table per provider. Lists the settings 10xGraph reads itself, which are not forwarded (provider, api_style, base_url, use_vertex_ai, anthropic_cache).
  • openai.md: removes the internal CALL_EXCLUDED_KWARGS wording and clarifies the caching FAQ answer.
  • google.md: replaces the old 3-key whitelist (cached_content, temperature, max_tokens) with the SDK-field rule.

Other

  • Sets updated: to 2026-11-20 on all four pages.

Testing

  • npm run build passes
  • Anchor links resolve: /docs/reference/python/agent#provider-specific-settings, /docs/integrations/anthropic#prompt-caching

…tions; synchronize update dates and enhance caching explanations
@Mothilal-M
Mothilal-M requested a review from Iamsdt November 21, 2026 06:56
@Mothilal-M Mothilal-M self-assigned this Nov 21, 2026
@Mothilal-M Mothilal-M added the documentation Improvements or additions to documentation label Nov 21, 2026
@Iamsdt
Iamsdt merged commit f42ed99 into main Nov 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants