Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions packages/provider/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](./LICENSE)

A **Vercel AI SDK provider that routes requests through your Coder deployment's
[AI Gateway](https://coder.com/docs/ai-coder/ai-gateway)** (formerly "AI Bridge" — the URL path is still `aibridge`). Point it
[AI Gateway](https://coder.com/docs/ai-coder/ai-gateway)** (formerly "AI Bridge"). Point it
at your deployment URL, hand it a Coder API token, and use any model your
deployment proxies with the AI SDK's `generateText` / `streamText` — the same way
you'd use [OpenRouter](https://ai-sdk.dev/providers/community-providers/openrouter)
Expand Down Expand Up @@ -192,9 +192,8 @@ normal provider call:

- **URL** — `POST <baseURL>/api/v2/aibridge/<provider>/v1/chat/completions`
(OpenAI surface) or `…/v1/messages` (Anthropic surface). `/api/v2/aibridge`
is this package's
default; deployments also serve the post-rename alias `/api/v2/ai-gateway`
(see `aiGatewayPath`).
is this package's default for compatibility. Use the canonical
`/api/v2/ai-gateway` path with Coder v2.35.0 or later (see `aiGatewayPath`).
- **Auth headers** — per the mode matrix below.
- **Body** — standard OpenAI-/Anthropic-format JSON: the model id (passed
through unchanged), your full prompt/message content, tool definitions, and
Expand Down
4 changes: 2 additions & 2 deletions packages/provider/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* `@coder/ai-sdk-provider` — a Vercel AI SDK provider that routes requests
* through a Coder deployment's **AI Gateway** (formerly "AI Bridge"; the URL
* path is still `aibridge`).
* through a Coder deployment's **AI Gateway** (formerly "AI Bridge"). The default
* path remains `/api/v2/aibridge` for compatibility.
*
* AI Gateway exposes two provider-namespaced surfaces on a deployment — an
* OpenAI-compatible one (`/api/v2/aibridge/openai/v1`) and an Anthropic-compatible
Expand Down
3 changes: 1 addition & 2 deletions packages/provider/src/provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ export interface CoderProviderSettings {
headers?: Record<string, string>;
/**
* Mount path of AI Gateway on the deployment. Defaults to `/api/v2/aibridge`.
* Exposed because the `aibridge` path segment may change in a future Coder
* release (the feature was renamed "AI Gateway").
* Set to the canonical `/api/v2/ai-gateway` path with Coder v2.35.0 or later.
*/
aiGatewayPath?: string;
/**
Expand Down