-
Notifications
You must be signed in to change notification settings - Fork 731
Document OpenAI compatible API provider usage #2777
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -197,6 +197,33 @@ For newer models like GPT-4.1 or GPT-5, the API type is automatically determined | |
| } | ||
| ``` | ||
|
|
||
| ### OpenAI Compatible | ||
|
|
||
| To use an OpenAPI compatible API provider, you need to provide the ai:endpoint, ai:apitoken, ai:model parameters, | ||
| and use "openai-chat" as the ai:mode. | ||
|
|
||
| :::note | ||
| The ai:endpoint is *NOT* a baseurl. The endpoint should contain the full endpoint, not just the baseurl. | ||
| For example: https://api.x.ai/v1/chat/completions | ||
|
|
||
| If you provide only the baseurl, you are likely to get a 404 message. | ||
|
Comment on lines
+206
to
+209
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Tighten wording: use “base URL.” “baseurl” is a spelling/formatting issue in docs; use “base URL” for clarity and consistency. ✍️ Suggested edit-The ai:endpoint is *NOT* a baseurl. The endpoint should contain the full endpoint, not just the baseurl.
+The ai:endpoint is *NOT* a base URL. The endpoint should contain the full endpoint URL, not just the base URL.🧰 Tools🪛 LanguageTool[grammar] ~206-~206: Ensure spelling is correct (QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1) [grammar] ~209-~209: Ensure spelling is correct (QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1) 🤖 Prompt for AI Agents |
||
| ::: | ||
|
|
||
| ```json | ||
| { | ||
| "xai-grokfast": { | ||
| "display:name": "xAI Grok Fast", | ||
| "display:order": 2, | ||
| "display:icon": "server", | ||
| "ai:apitype": "openai-chat", | ||
| "ai:model": "x-ai/grok-4-fast", | ||
| "ai:endpoint": "https://api.x.ai/v1/chat/completions", | ||
| "ai:apitoken": "<your-api-key>" | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
|
|
||
| ### OpenRouter | ||
|
|
||
| [OpenRouter](https://openrouter.ai) provides access to multiple AI models. Using the `openrouter` provider simplifies configuration: | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix incorrect field name and provider terminology.
The config key should be
ai:apitype, notai:mode, and this section should say “OpenAI‑compatible,” not “OpenAPI compatible,” to match the rest of the doc and avoid broken configs.✅ Proposed wording fix
📝 Committable suggestion
🧰 Tools
🪛 LanguageTool
[grammar] ~202-~202: Use a hyphen to join words.
Context: ...### OpenAI Compatible To use an OpenAPI compatible API provider, you need to pro...
(QB_NEW_EN_HYPHEN)
🤖 Prompt for AI Agents