Skip to content

fix #392 docs(openai): update OpenAI adapter documentation to reflect model pa…#406

Open
liyown wants to merge 1 commit intoTanStack:mainfrom
liyown:fix/update-openapi-adapter-example
Open

fix #392 docs(openai): update OpenAI adapter documentation to reflect model pa…#406
liyown wants to merge 1 commit intoTanStack:mainfrom
liyown:fix/update-openapi-adapter-example

Conversation

@liyown
Copy link
Copy Markdown

@liyown liyown commented Mar 29, 2026

Updated OpenAI adapter docs to match the current API signatures and naming:

  • Fixed examples to use createOpenai* with model as the first parameter:
    • createOpenaiChat(model, apiKey, config?)
    • createOpenaiSummarize(model, apiKey, config?)
    • createOpenaiImage(model, apiKey, config?)
    • createOpenaiSpeech(model, apiKey, config?)
    • createOpenaiTranscription(model, apiKey, config?)
  • Corrected the custom API key chat example so it uses a created adapter directly (not as a factory call).
  • Updated type import in config example from OpenAIChatConfig to OpenAITextConfig.
  • Renamed TTS docs usage from openaiTTS / createOpenaiTTS to openaiSpeech / createOpenaiSpeech to match actual exports.
  • Updated API reference headings/signatures accordingly.

Motivation: docs were inconsistent with the current adapter API and could mislead users into passing apiKey as arg #1 or using non-existent TTS
function names.

✅ Checklist

Summary by CodeRabbit

  • Documentation
    • Updated OpenAI adapter API documentation with revised function signatures requiring explicit model specification across all adapter constructors
    • Renamed text-to-speech adapter naming convention from TTS to Speech terminology
    • Refreshed all examples and configuration references to reflect current API patterns

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 29, 2026

📝 Walkthrough

Walkthrough

Documentation updates to OpenAI adapter APIs requiring explicit model argument for factory and helper functions. Text-to-speech APIs renamed from openaiTTS to openaiSpeech, with signature changes applied consistently across adapter constructors in examples and API reference sections.

Changes

Cohort / File(s) Summary
OpenAI Adapter Documentation
docs/adapters/openai.md
Updated adapter factory and helper function signatures to require explicit model as leading parameter; renamed TTS APIs (openaiTTS/createOpenaiTTSopenaiSpeech/createOpenaiSpeech); updated type imports from OpenAIChatConfig to OpenAITextConfig; revised examples and API reference for all adapter constructors.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 Hops the rabbit through the docs with glee,
Models now explicit for all to see,
TTS becomes Speech in the clearest way,
APIs refined for a brighter day! 🌟

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description check ✅ Passed The description follows the template with a comprehensive 🎯 Changes section and completed ✅ Checklist, covering all updates and motivation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title clearly indicates this PR updates OpenAI adapter documentation to reflect model parameter changes, which directly aligns with the changeset focused on updating API signatures and exports in the documentation.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@liyown liyown changed the title docs(openai): update OpenAI adapter documentation to reflect model pa… fix #392 docs(openai): update OpenAI adapter documentation to reflect model pa… Mar 29, 2026
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