diff --git a/packages/provider/README.md b/packages/provider/README.md index 98442cc..850e733 100644 --- a/packages/provider/README.md +++ b/packages/provider/README.md @@ -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) @@ -192,9 +192,8 @@ normal provider call: - **URL** — `POST /api/v2/aibridge//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 diff --git a/packages/provider/src/index.ts b/packages/provider/src/index.ts index 2636b48..541fd48 100644 --- a/packages/provider/src/index.ts +++ b/packages/provider/src/index.ts @@ -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 diff --git a/packages/provider/src/provider.ts b/packages/provider/src/provider.ts index 50c7010..a5ebbc5 100644 --- a/packages/provider/src/provider.ts +++ b/packages/provider/src/provider.ts @@ -47,8 +47,7 @@ export interface CoderProviderSettings { headers?: Record; /** * 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; /**