Skip to content

Conversation

@nauvalazhar
Copy link
Contributor

@nauvalazhar nauvalazhar commented Jan 16, 2026

🎯 Changes

Updated the documentation examples to use the content property instead of text.

This change aligns the documentation with the internal type definitions, where content is the expected field name. Using text in the docs could lead to type errors or confusion for developers implementing the library based on the examples.

✅ Checklist

  • I have followed the steps in the Contributing guide.
  • I have tested this code locally with pnpm run test:pr.

🚀 Release Impact

  • This change affects published code, and I have generated a changeset.
  • This change is docs/CI/dev-only (no release).

Summary by CodeRabbit

  • Documentation
    • Updated multimodal content guide with corrected examples for text content formatting in message payloads across multiple AI providers (OpenAI, Anthropic, Gemini, Ollama).

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 16, 2026

📝 Walkthrough

Walkthrough

Documentation updated to reflect API payload structure changes in multimodal message examples. All text content fields renamed from text to content across provider examples (OpenAI, Anthropic, Gemini, Ollama) and multimodal/backward-compatibility sections.

Changes

Cohort / File(s) Summary
Documentation Updates
docs/guides/multimodal-content.md
Updated multimodal message examples across all provider sections; changed text part field name from text: '...' to content: '...' in TextPart definitions and message payloads. Consistent field rename applied to OpenAI, Anthropic, Gemini, Ollama, multimodal, and backward-compatibility example sections.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 The field names do hop and change,
From text to content they rearrange,
Through docs we prance with joy so bright,
Multimodal messages now just right! 🎉

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: updating documentation examples to use 'content' instead of 'text' in multimodal examples.
Description check ✅ Passed The description follows the template structure, includes a clear explanation of changes and motivation, and has the checklist mostly completed with appropriate selections for a docs-only change.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.



📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8e93ce2 and db71c7f.

📒 Files selected for processing (1)
  • docs/guides/multimodal-content.md
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-12-13T17:09:09.794Z
Learnt from: CR
Repo: TanStack/ai PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-13T17:09:09.794Z
Learning: Maintain type safety through multimodal content support (image, audio, video, document) with model capability awareness

Applied to files:

  • docs/guides/multimodal-content.md
🔇 Additional comments (3)
docs/guides/multimodal-content.md (3)

24-27: Documentation correctly aligned with type definitions.

The TextPart interface definition and usage examples are now consistent, showing content as the field name. This establishes the correct pattern for developers.

Also applies to: 66-66


248-248: Backward compatibility and type safety examples correctly updated.

The examples in critical sections (backward compatibility, type safety with assertMessages) now demonstrate the correct field name, ensuring developers implementing type-safe multimodal messages use the proper API.

Also applies to: 299-299


95-95: Provider examples consistently use the correct field name.

All provider-specific examples (OpenAI, Anthropic, Gemini, Ollama) correctly use the content field for text parts, matching the TypeScript type definitions where TextPart is defined with content: string.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.


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 and usage tips.

@AlemTuzlak AlemTuzlak merged commit b4d988f into TanStack:main Jan 16, 2026
2 checks passed
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.

2 participants