@arnilo/prism 0.2.8 → 0.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -0
- package/README.md +5 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/oauth-device-code.d.ts +5 -0
- package/dist/oauth-device-code.js +38 -14
- package/docs/0.1.0-readiness.md +6 -6
- package/docs/caveman.md +3 -2
- package/docs/context-and-skills.md +2 -2
- package/docs/credential-storage.md +1 -1
- package/docs/credentials-and-redaction.md +2 -2
- package/docs/extensions.md +1 -0
- package/docs/impeccable.md +102 -0
- package/docs/index.md +4 -3
- package/docs/migration.md +11 -0
- package/docs/ponytail.md +2 -2
- package/docs/provider-caching.md +6 -0
- package/docs/provider-packages.md +19 -6
- package/docs/providers/clinepass.md +120 -0
- package/docs/providers/deepseek.md +147 -0
- package/docs/providers/openai.md +1 -1
- package/docs/providers/xai.md +138 -0
- package/docs/release-and-install.md +32 -11
- package/docs/thinking-and-reasoning.md +6 -3
- package/package.json +2 -2
|
@@ -23,6 +23,9 @@ Do not use provider packages as a package manager, credential store, env loader,
|
|
|
23
23
|
| Package | 0.0.12 auth registration | Subscription OAuth boundary |
|
|
24
24
|
| --- | --- | --- |
|
|
25
25
|
| `@arnilo/prism-provider-openai` | `api_key` for `openai`; `oauth` for `openai-codex` | Existing host-invoked OpenAI Codex PKCE/device-code flow only. |
|
|
26
|
+
| `@arnilo/prism-provider-xai` | `api_key` and `oauth` for `xai` | Host-invoked SuperGrok / X Premium RFC 8628 device-code against `auth.x.ai`. Public Grok CLI client id is not a secret. No PKCE loopback, no `~/.grok` import, no `cli-chat-proxy.grok.com`. |
|
|
27
|
+
| `@arnilo/prism-provider-deepseek` | `api_key` only | No subscription OAuth. |
|
|
28
|
+
| `@arnilo/prism-provider-clinepass` | `api_key` only | No Cline WorkOS / Cline OAuth store share. Host supplies `CLINE_API_KEY`. |
|
|
26
29
|
| `@arnilo/prism-provider-anthropic` | `api_key` only | No Claude Code/Claude.ai subscription OAuth, credential-file/setup-token import, or routing. [Anthropic requires product developers to use API keys or supported cloud providers](https://docs.anthropic.com/en/docs/claude-code/legal-and-compliance). |
|
|
27
30
|
| `@arnilo/prism-provider-google` | `api_key` only | No Gemini CLI OAuth or credential/token import. [Gemini CLI prohibits third-party OAuth piggybacking](https://github.com/google-gemini/gemini-cli/blob/main/docs/resources/tos-privacy.md); use Google AI Studio API keys. Vertex/ADC uses separate [`@arnilo/prism-provider-vertex`](providers/vertex.md). |
|
|
28
31
|
| `@arnilo/prism-provider-azure` | host Entra token or Azure resource key | Workload identity via `credential` callback; endpoint host preserved ([docs](providers/azure.md)). |
|
|
@@ -70,7 +73,7 @@ Hosts decide which credential resolvers, env objects, OAuth stores, request poli
|
|
|
70
73
|
|
|
71
74
|
Provider request options: `ProviderRequestOptions` carries session/cache/header/compat/extra hints only. Timeouts are host-owned (`RunOptions.signal`/host abort controllers); retries are runtime-owned (`AgentConfig.retry`/`RunOptions.retry`). Provider-level timeout/retry hints were removed in 0.1.5. Provider packages should not add provider-specific retry loops unless the vendor protocol requires it and runtime retry cannot cover the failure mode.
|
|
72
75
|
|
|
73
|
-
First-party providers map generic `ModelConfig.parameters.maxTokens` to real output-token request fields instead of sending `maxTokens` on the wire: OpenAI Responses uses `max_output_tokens`;
|
|
76
|
+
First-party providers map generic `ModelConfig.parameters.maxTokens` to real output-token request fields instead of sending `maxTokens` on the wire: OpenAI Responses uses `max_output_tokens`; ClinePass uses `max_completion_tokens`; OpenRouter, OpenCode Go, Z.AI, Kimi, NeuralWatt, DeepSeek, and xAI use `max_tokens`. Other `model.parameters` values pass through unchanged unless the provider docs say otherwise.
|
|
74
77
|
|
|
75
78
|
## First-party provider package skeletons
|
|
76
79
|
|
|
@@ -80,9 +83,9 @@ Phase 12 adds explicit npm workspaces for [`@arnilo/prism-provider-openai`](prov
|
|
|
80
83
|
|
|
81
84
|
Phase 6 also adds optional [`@arnilo/prism-provider-ai-sdk`](providers/ai-sdk.md), which adapts a host-owned AI SDK `LanguageModelV4` to Prism's `AIProvider`. It joins `@arnilo/prism-providers` as the seventh adapter while remaining independent from the six HTTP implementations.
|
|
82
85
|
|
|
83
|
-
Provider live tests are real smoke tests gated by `PRISM_LIVE_PROVIDER_TESTS=1` plus the provider-specific API key (`OPENAI_API_KEY`, `OPENROUTER_API_KEY`, `KIMI_API_KEY`, `ZAI_API_KEY`, `NEURALWATT_API_KEY`, or `
|
|
86
|
+
Provider live tests are real smoke tests gated by `PRISM_LIVE_PROVIDER_TESTS=1` plus the provider-specific API key (`OPENAI_API_KEY`, `OPENROUTER_API_KEY`, `KIMI_API_KEY`, `ZAI_API_KEY`, `NEURALWATT_API_KEY`, `OPENCODE_API_KEY`, `DEEPSEEK_API_KEY`, `XAI_API_KEY`, or `CLINE_API_KEY`). They cover text generation, tool-call loop behavior, abort/error paths where supported, and no-secret-leak assertions; they skip by default and never run in release verification. SuperGrok login is operator-only (`PRISM_LIVE_XAI_OAUTH=1`).
|
|
84
87
|
|
|
85
|
-
These workspaces still follow the same rule as external packages: no provider SDK dependency, catalog fetch, env scan, keychain/file credential lookup, shell auth command, OAuth login, or live provider call runs by default. `@arnilo/prism-provider-openai` now registers OpenAI Responses and OpenAI Codex providers from caller-supplied credentials only, with optional `models`/`codexModels` overrides and an opt-in `listOpenAIModels()` helper for official `GET /models` discovery. `@arnilo/prism-provider-opencode-go` now registers docs-verified OpenCode Go open coding models with dual OpenAI/Anthropic routes (`compat.route`), official default base `https://opencode.ai/zen/go/v1`, `reasoning_content`/thinking preserve, and an opt-in `listOpenCodeGoModels()` helper for official `GET /zen/go/v1/models`. `@arnilo/prism-provider-openrouter` now registers an app-controlled OpenRouter catalog with routing/`reasoning`/cache passthrough, assistant `reasoning` replay, optional top-level automatic `cache_control`, and an opt-in `listOpenRouterModels()` helper for official `GET /api/v1/models` (setup still never fetches). `@arnilo/prism-provider-zai` now registers featured GLM-5.x/4.x metadata with official `thinking`/`reasoning_effort`/`tool_stream`/`clear_thinking` mapping, Preserved Thinking `reasoning_content` replay, implicit context caching, and an opt-in `listZaiModels()` helper for OpenAI-compatible `GET /models`. `@arnilo/prism-provider-kimi` now registers Kimi Coding Anthropic-compatible behavior by default, optional callable Moonshot Open Platform Chat Completions when `includeMoonshotModels` is requested, official Coding/Open Platform featured ids, thinking/`reasoning_effort` compat mapping, and an opt-in `listKimiModels()` helper for Moonshot `GET /v1/models`. `@arnilo/prism-provider-neuralwatt` now registers static featured model metadata with NeuralWatt reasoning_effort/thinking_token_budget/chat_template_kwargs request mapping, SSE comment tolerance, an opt-in `listNeuralWattModels()` helper for explicit `/v1/models` discovery, `getNeuralWattQuota()` for on-demand account balance/usage/energy, `neuralWattEventsWithTelemetry()`/`mapNeuralWattTelemetry()` for `: energy`/`: cost` telemetry, and `classifyNeuralWattError()` for retry classification. None of these helpers run during package setup or generation. `@arnilo/prism-provider-anthropic` registers native Anthropic Messages (`createAnthropicProviderPackage` / `listAnthropicModels`). `@arnilo/prism-provider-google` registers native Gemini `generateContent` streaming (`createGoogleProviderPackage` / `listGoogleModels`; Vertex identity stays in the separate package). Both follow the same zero-setup-network / host-owned credential / provider-owned-header rules; see [`docs/providers/anthropic.md`](providers/anthropic.md) and [`docs/providers/google.md`](providers/google.md).
|
|
88
|
+
These workspaces still follow the same rule as external packages: no provider SDK dependency, catalog fetch, env scan, keychain/file credential lookup, shell auth command, OAuth login, or live provider call runs by default. `@arnilo/prism-provider-openai` now registers OpenAI Responses and OpenAI Codex providers from caller-supplied credentials only, with optional `models`/`codexModels` overrides and an opt-in `listOpenAIModels()` helper for official `GET /models` discovery. `@arnilo/prism-provider-opencode-go` now registers docs-verified OpenCode Go open coding models with dual OpenAI/Anthropic routes (`compat.route`), official default base `https://opencode.ai/zen/go/v1`, `reasoning_content`/thinking preserve, and an opt-in `listOpenCodeGoModels()` helper for official `GET /zen/go/v1/models`. `@arnilo/prism-provider-openrouter` now registers an app-controlled OpenRouter catalog with routing/`reasoning`/cache passthrough, assistant `reasoning` replay, optional top-level automatic `cache_control`, and an opt-in `listOpenRouterModels()` helper for official `GET /api/v1/models` (setup still never fetches). `@arnilo/prism-provider-zai` now registers featured GLM-5.x/4.x metadata with official `thinking`/`reasoning_effort`/`tool_stream`/`clear_thinking` mapping, Preserved Thinking `reasoning_content` replay, implicit context caching, and an opt-in `listZaiModels()` helper for OpenAI-compatible `GET /models`. `@arnilo/prism-provider-kimi` now registers Kimi Coding Anthropic-compatible behavior by default, optional callable Moonshot Open Platform Chat Completions when `includeMoonshotModels` is requested, official Coding/Open Platform featured ids, thinking/`reasoning_effort` compat mapping, and an opt-in `listKimiModels()` helper for Moonshot `GET /v1/models`. `@arnilo/prism-provider-neuralwatt` now registers static featured model metadata with NeuralWatt reasoning_effort/thinking_token_budget/chat_template_kwargs request mapping, SSE comment tolerance, an opt-in `listNeuralWattModels()` helper for explicit `/v1/models` discovery, `getNeuralWattQuota()` for on-demand account balance/usage/energy, `neuralWattEventsWithTelemetry()`/`mapNeuralWattTelemetry()` for `: energy`/`: cost` telemetry, and `classifyNeuralWattError()` for retry classification. None of these helpers run during package setup or generation. `@arnilo/prism-provider-deepseek` registers featured `deepseek-v4-flash` / `deepseek-v4-pro` with official `thinking` / `reasoning_effort`, tool-turn `reasoning_content` replay, implicit prefix cache, and caller-gated `listDeepSeekModels`. `@arnilo/prism-provider-xai` registers featured Completions (`grok-4.6` / `grok-4.3` / `grok-build-0.1`), `x-grok-conv-id`, `reasoning_content` replay, caller-gated `listXaiModels`, and host-invoked SuperGrok device-code OAuth against `auth.x.ai`. `@arnilo/prism-provider-clinepass` registers a static `cline-pass/*` catalog, stream-only Chat Completions, per-model `reasoning_effort` maps, and `api_key` only (no WorkOS, no `listClinePassModels`). `@arnilo/prism-provider-anthropic` registers native Anthropic Messages (`createAnthropicProviderPackage` / `listAnthropicModels`). `@arnilo/prism-provider-google` registers native Gemini `generateContent` streaming (`createGoogleProviderPackage` / `listGoogleModels`; Vertex identity stays in the separate package). Both follow the same zero-setup-network / host-owned credential / provider-owned-header rules; see [`docs/providers/anthropic.md`](providers/anthropic.md) and [`docs/providers/google.md`](providers/google.md).
|
|
86
89
|
|
|
87
90
|
### Phase 10 compatibility matrix
|
|
88
91
|
|
|
@@ -101,13 +104,16 @@ Every package remains explicit, setup-zero-fetch, and late-credential-bound. `Mo
|
|
|
101
104
|
| Alibaba | DashScope OpenAI-compatible; caller-gated list | text, image | tool deltas, Qwen thinking | implicit / optional markers; protected host probe |
|
|
102
105
|
| Ollama | Cloud/local OpenAI-compatible; caller-gated list | text, image | tool deltas, reasoning effort | implicit only; protected host/daemon probe |
|
|
103
106
|
| NeuralWatt | OpenAI-compatible; caller-gated list | text, image | tool deltas, reasoning and telemetry | implicit; protected API-key smoke |
|
|
107
|
+
| DeepSeek | OpenAI-compatible; caller-gated list | text | tool deltas, `reasoning_content` on tool turns | implicit; protected API-key smoke |
|
|
108
|
+
| xAI | OpenAI-compatible Completions; caller-gated list | text, image | tool deltas, `reasoning_content` replay | implicit + `x-grok-conv-id`; protected API-key smoke; SuperGrok login operator-only |
|
|
109
|
+
| ClinePass | OpenAI-compatible stream-only; static `cline-pass/*` catalog | text | tool deltas, per-model `reasoning_effort` | implicit; protected API-key smoke |
|
|
104
110
|
| Azure | Azure/Foundry OpenAI-compatible; host models | selected endpoint/model capability | normalized OpenAI-compatible tools | no Prism cache mapping; protected host workload-identity probe |
|
|
105
111
|
| Bedrock | Bedrock OpenAI-compatible; host models | selected endpoint/model capability | normalized OpenAI-compatible tools | no Prism cache mapping; protected host IAM/IRSA probe |
|
|
106
112
|
| Vertex | Vertex OpenAPI-compatible; host models | selected endpoint/model capability | normalized OpenAI-compatible tools | no Prism cache mapping; protected host ADC/WIF probe |
|
|
107
113
|
|
|
108
114
|
### First-party cache behavior
|
|
109
115
|
|
|
110
|
-
Every first-party provider package hardens prompt-cache behavior so it cannot emit invalid cache retention values or over-broad cache-control markers, and so provider-owned `authorization`/session/security headers cannot be overridden by caller `ProviderRequest.options.headers`. Cache behavior is provider-specific and best-effort: OpenAI/OpenRouter use explicit hints, NeuralWatt/Z.AI use implicit caching, and OpenCode Go/Kimi are route/model-dependent. See [Provider caching](provider-caching.md#per-provider-cache-behavior) for the canonical explicit/implicit matrix.
|
|
116
|
+
Every first-party provider package hardens prompt-cache behavior so it cannot emit invalid cache retention values or over-broad cache-control markers, and so provider-owned `authorization`/session/security headers cannot be overridden by caller `ProviderRequest.options.headers`. Cache behavior is provider-specific and best-effort: OpenAI/OpenRouter use explicit hints, NeuralWatt/Z.AI/DeepSeek/ClinePass use implicit caching, xAI adds a sanitized `x-grok-conv-id`, and OpenCode Go/Kimi are route/model-dependent. See [Provider caching](provider-caching.md#per-provider-cache-behavior) for the canonical explicit/implicit matrix.
|
|
111
117
|
|
|
112
118
|
- **OpenAI** (`kind: openai_key`): `prompt_cache_key` is sanitized and clamped to 64 chars; `prompt_cache_retention` is emitted as `24h` only when the model declares `cache.longRetention`, and omitted for `short`/`none` (the API only accepts absent or `24h`). `prompt_tokens_details.cached_tokens` maps to `Usage.cacheReadTokens`.
|
|
113
119
|
- **OpenAI-compatible core adapter**: Chat Completions sends no `prompt_cache_key`/`prompt_cache_retention`/`cache_control` fields; endpoints cache implicitly. `prompt_tokens_details.cached_tokens` maps to `Usage.cacheReadTokens`.
|
|
@@ -118,6 +124,9 @@ Every first-party provider package hardens prompt-cache behavior so it cannot em
|
|
|
118
124
|
- **Kimi**: default catalog models use implicit caching (no `cache_control`); hosts opt in via `ModelConfig.cache.kind: cache_control` on the Anthropic `/messages` route, then markers apply only to selected breakpoints (`long` → `ttl: 1h`); the Moonshot OpenAI route sends none. `cache_read_input_tokens`/`cache_creation_input_tokens` map to cache usage.
|
|
119
125
|
- **Alibaba Cloud** (implicit by default, optional `cache_control`): DashScope implicit prefix caching is automatic; hosts opt in via `ModelConfig.cache.kind: cache_control`, then `cache_control: {"type":"ephemeral"}` markers apply only to selected breakpoints, capped at 4. `prompt_tokens_details.cached_tokens`/`cache_creation_input_tokens` map to cache usage. Caller-gated `listAlibabaModels`.
|
|
120
126
|
- **Ollama** (`kind: implicit`): Ollama KV/prefix caching is automatic with no request knob; sends no explicit cache payload. Ollama reports no cached-token count, so `Usage.cacheReadTokens` stays `undefined`. Caller-gated `listOllamaModels`.
|
|
127
|
+
- **DeepSeek** (`kind: implicit`): official prefix cache; no cache payload. Tool schemas canonicalized. `prompt_cache_hit_tokens` → `cacheReadTokens`. Caller-gated `listDeepSeekModels`.
|
|
128
|
+
- **xAI** (`kind: implicit`): prefix cache plus sanitized `x-grok-conv-id` (never a SuperGrok token). Replay `reasoning_content` on reasoning models. `cached_tokens` → `cacheReadTokens`. Caller-gated `listXaiModels`.
|
|
129
|
+
- **ClinePass** (`kind: implicit`): no cache payload; stream-only. `cached_tokens` / `prompt_cache_hit_tokens` map when present. Static `cline-pass/*` catalog.
|
|
121
130
|
|
|
122
131
|
See [Provider caching](provider-caching.md) for the `PromptCacheHints` surface and shared helpers, and [Provider conformance](provider-conformance.md) for the `assertUsageAccounting` and `assertProviderOwnedHeadersWin` checks every first-party package exercises.
|
|
123
132
|
|
|
@@ -162,6 +171,9 @@ Template: [`listNeuralWattModels`](providers/neuralwatt.md) in `@arnilo/prism-pr
|
|
|
162
171
|
| OpenCode Go | **`listOpenCodeGoModels`** (official `GET /zen/go/v1/models`) | Featured dual-route official Go aliases | Official Go docs endpoint table + sparse list API |
|
|
163
172
|
| NeuralWatt | **`listNeuralWattModels` (exists)** | Featured aliases without guessed pricing | Auth optional for public models |
|
|
164
173
|
| AI SDK | None | Host-owned `LanguageModelV4` | No Prism-side catalog by design |
|
|
174
|
+
| DeepSeek | **`listDeepSeekModels`** (OpenAI-compatible `GET /models`) | Featured `deepseek-v4-flash` / `deepseek-v4-pro` | Official Completions catalog |
|
|
175
|
+
| xAI | **`listXaiModels`** (OpenAI-compatible `GET /models`) | Featured Completions (`grok-4.6` / `grok-4.3` / `grok-build-0.1`) | `grok-4.5` / Responses deferred |
|
|
176
|
+
| ClinePass | None | Static official `cline-pass/*` slugs | No documented `GET /models` |
|
|
165
177
|
|
|
166
178
|
Host pattern:
|
|
167
179
|
|
|
@@ -176,7 +188,7 @@ Discovery may populate `ModelConfig.cache` and `ModelConfig.cost` from live meta
|
|
|
176
188
|
|
|
177
189
|
Hosts set effort with portable helpers from `@arnilo/prism` (`applyThinkingLevel`, `thinkingCompatFor`) that write official fields into `ProviderRequestOptions.compat`. Model defaults stay on `ModelConfig.compat`; per-turn patches win via `mergeProviderRequestOptions`. Providers keep reading `options.compat` / `model.compat` — do not invent a parallel options tree or put effort only in `extra`.
|
|
178
190
|
|
|
179
|
-
Canonical contract: [Thinking and reasoning](thinking-and-reasoning.md). Package-local knobs (NeuralWatt budgets, Z.AI `tool_stream`, Kimi keep/all) remain on `compat` beside the shared families.
|
|
191
|
+
Canonical contract: [Thinking and reasoning](thinking-and-reasoning.md). Package-local knobs (NeuralWatt budgets, Z.AI `tool_stream`, Kimi keep/all, ClinePass `thinkingLevelMap`, DeepSeek tool-turn `reasoning_content` replay, xAI reasoning replay) remain on `compat` beside the shared families.
|
|
180
192
|
|
|
181
193
|
## Third-party provider packaging
|
|
182
194
|
|
|
@@ -186,7 +198,8 @@ provider packages: an `Extension` whose `setup(api)` calls
|
|
|
186
198
|
provider packages (`@arnilo/prism-provider-openai`, `@arnilo/prism-provider-openrouter`,
|
|
187
199
|
`@arnilo/prism-provider-kimi`, `@arnilo/prism-provider-zai`,
|
|
188
200
|
`@arnilo/prism-provider-opencode-go`, `@arnilo/prism-provider-alibaba`,
|
|
189
|
-
`@arnilo/prism-provider-ollama
|
|
201
|
+
`@arnilo/prism-provider-ollama`, `@arnilo/prism-provider-deepseek`,
|
|
202
|
+
`@arnilo/prism-provider-xai`, `@arnilo/prism-provider-clinepass`) are **opt-in and individually installable**;
|
|
190
203
|
`@arnilo/prism` core runs without any first-party provider package (mock-only).
|
|
191
204
|
|
|
192
205
|
A host mixes first-party packages and third-party providers in one resolver.
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# ClinePass provider package
|
|
2
|
+
|
|
3
|
+
## What it does
|
|
4
|
+
|
|
5
|
+
`@arnilo/prism-provider-clinepass` provides explicit, side-effect-free setup for
|
|
6
|
+
the ClinePass OpenAI-compatible Chat Completions API at
|
|
7
|
+
`https://api.cline.bot/api/v1`. Requests always stream. Model ids are official
|
|
8
|
+
`cline-pass/…` slugs from a static featured catalog.
|
|
9
|
+
|
|
10
|
+
## When to use it
|
|
11
|
+
|
|
12
|
+
Use it when a host has a ClinePass subscription key (`CLINE_API_KEY`) and wants
|
|
13
|
+
those open coding models through Prism `AgentSession`.
|
|
14
|
+
|
|
15
|
+
Do not use it for Cline WorkOS OAuth, Claude/Gemini subscription routing,
|
|
16
|
+
non-stream `{ data, success }` responses ([cline#12647](https://github.com/cline/cline/issues/12647)),
|
|
17
|
+
or caller-gated `GET /models` (no documented OpenAI models endpoint).
|
|
18
|
+
|
|
19
|
+
## Inputs / request
|
|
20
|
+
|
|
21
|
+
```ts
|
|
22
|
+
import { createClinePassProviderPackage } from "@arnilo/prism-provider-clinepass";
|
|
23
|
+
|
|
24
|
+
createClinePassProviderPackage(options: ClinePassProviderPackageOptions): ProviderPackage
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
| Field | Type | Purpose |
|
|
28
|
+
| --- | --- | --- |
|
|
29
|
+
| `apiKey` | `CredentialValueSource` | Host-supplied ClinePass key. No env scan. |
|
|
30
|
+
| `fetch` | `typeof fetch` | Optional fetch for tests/hosts. |
|
|
31
|
+
| `baseUrl` | `string` | Default `https://api.cline.bot/api/v1`. |
|
|
32
|
+
| `id` | `string` | Provider id (default `clinepass`). |
|
|
33
|
+
| `models` | `readonly ModelConfig[]` | Overrides static `clinePassModels`. |
|
|
34
|
+
|
|
35
|
+
There is no `listClinePassModels`.
|
|
36
|
+
|
|
37
|
+
### Thinking / reasoning compat
|
|
38
|
+
|
|
39
|
+
Per-model `compat.thinkingLevelMap` maps portable levels to wire
|
|
40
|
+
`reasoning_effort`. Request `options.compat.reasoning_effort` (or
|
|
41
|
+
`applyThinkingLevel(..., "reasoning_effort")`) wins.
|
|
42
|
+
|
|
43
|
+
| Family | slugs | map |
|
|
44
|
+
| --- | --- | --- |
|
|
45
|
+
| GLM | `cline-pass/glm-5.2` | `off→none`, `low/medium/high`, `xhigh` passthrough. Do not send `max` (upstream 500). |
|
|
46
|
+
| Kimi K3 | `cline-pass/kimi-k3` | `high→max` only. Off/low/medium omitted. |
|
|
47
|
+
| Kimi | `kimi-k2.7-code`, `kimi-k2.6` | `low/medium/high`. Off omitted. |
|
|
48
|
+
| DeepSeek | `deepseek-v4-pro`, `deepseek-v4-flash` | `off→none`, `high`/`xhigh→high`. |
|
|
49
|
+
| Standard | MiMo, MiniMax, Qwen | `off→none`, `low/medium/high`. |
|
|
50
|
+
|
|
51
|
+
Completion budget is `max_completion_tokens` (not `max_tokens`).
|
|
52
|
+
|
|
53
|
+
## Outputs / response / events
|
|
54
|
+
|
|
55
|
+
| Surface | Behavior |
|
|
56
|
+
| --- | --- |
|
|
57
|
+
| Provider stream | Prism text, thinking (`delta.reasoning` / `delta.reasoning_content`), tool-call, `usage`, `done`, redacted `error`. |
|
|
58
|
+
| Cache | Implicit upstream. `cached_tokens` / `prompt_cache_hit_tokens` → `cacheReadTokens` when present. No `cache_control`. |
|
|
59
|
+
| Auth | `api_key` only. |
|
|
60
|
+
| Non-stream | Unsupported. `{ success, data }` wrappers are not parsed. |
|
|
61
|
+
|
|
62
|
+
## Request/response example
|
|
63
|
+
|
|
64
|
+
```json
|
|
65
|
+
{
|
|
66
|
+
"model": "cline-pass/deepseek-v4-flash",
|
|
67
|
+
"messages": [{ "role": "user", "content": "Hello" }],
|
|
68
|
+
"stream": true,
|
|
69
|
+
"reasoning_effort": "high"
|
|
70
|
+
}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Implementation example
|
|
74
|
+
|
|
75
|
+
```ts
|
|
76
|
+
import { createExtensionKernel } from "@arnilo/prism";
|
|
77
|
+
import { createClinePassProviderPackage } from "@arnilo/prism-provider-clinepass";
|
|
78
|
+
|
|
79
|
+
const kernel = createExtensionKernel();
|
|
80
|
+
await kernel.load([createClinePassProviderPackage({ apiKey: "fake-cline-key" })]);
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Per-turn effort:
|
|
84
|
+
|
|
85
|
+
```ts
|
|
86
|
+
await session.prompt("Plan the refactor", {
|
|
87
|
+
providerOptions: { compat: { reasoning_effort: "low" } },
|
|
88
|
+
});
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Extension and configuration notes
|
|
92
|
+
|
|
93
|
+
- Featured slugs: `glm-5.2`, `kimi-k3`, `kimi-k2.7-code`, `kimi-k2.6`,
|
|
94
|
+
`deepseek-v4-pro`, `deepseek-v4-flash`, `mimo-v2.5`, `mimo-v2.5-pro`,
|
|
95
|
+
`minimax-m3`, `qwen3.8-max`, `qwen3.7-max`, `qwen3.7-plus` (all prefixed
|
|
96
|
+
`cline-pass/`).
|
|
97
|
+
- Catalog is static. Hosts may pass `models` to override.
|
|
98
|
+
- Multi-backend gateway: key compat off `api.cline.bot`, not the upstream vendor.
|
|
99
|
+
- Reference USD-per-million costs are catalog metadata; ClinePass itself is a subscription.
|
|
100
|
+
|
|
101
|
+
## Security and performance notes
|
|
102
|
+
|
|
103
|
+
- No network on import, setup, build, or default tests.
|
|
104
|
+
- No WorkOS, no Cline OAuth store share, no env/file lookup.
|
|
105
|
+
- API keys resolved per request and redacted from errors.
|
|
106
|
+
- Provider-owned headers win. One POST per generate. Bounded error bodies.
|
|
107
|
+
- Live tests: `PRISM_LIVE_PROVIDER_TESTS=1` plus `CLINE_API_KEY`.
|
|
108
|
+
|
|
109
|
+
## Related APIs
|
|
110
|
+
|
|
111
|
+
- [Provider packages](../provider-packages.md)
|
|
112
|
+
- [Thinking and reasoning](../thinking-and-reasoning.md)
|
|
113
|
+
- [Provider caching](../provider-caching.md)
|
|
114
|
+
- [Credentials and redaction](../credentials-and-redaction.md)
|
|
115
|
+
- [Provider conformance](../provider-conformance.md)
|
|
116
|
+
|
|
117
|
+
## Official evidence
|
|
118
|
+
|
|
119
|
+
- [ClinePass](https://docs.cline.bot/getting-started/clinepass)
|
|
120
|
+
- [Non-stream wrap](https://github.com/cline/cline/issues/12647)
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
# DeepSeek provider package
|
|
2
|
+
|
|
3
|
+
## What it does
|
|
4
|
+
|
|
5
|
+
`@arnilo/prism-provider-deepseek` provides explicit, side-effect-free setup for the
|
|
6
|
+
DeepSeek Chat Completions API (`POST /chat/completions`) with official thinking
|
|
7
|
+
mode, reasoning-effort mapping, tool-turn `reasoning_content` replay, and
|
|
8
|
+
implicit prefix caching.
|
|
9
|
+
|
|
10
|
+
The package registers a provider, featured V4 model metadata, and an `api_key`
|
|
11
|
+
auth method through `createExtensionKernel().load([...])`.
|
|
12
|
+
|
|
13
|
+
## When to use it
|
|
14
|
+
|
|
15
|
+
Use it when a host app wants DeepSeek V4 Flash / Pro through Prism's
|
|
16
|
+
`AgentSession` runtime with official `thinking` / `reasoning_effort` mapping
|
|
17
|
+
and automatic KV prefix cache.
|
|
18
|
+
|
|
19
|
+
Do not use it for the Anthropic-compatible route, automatic credential
|
|
20
|
+
discovery, setup-time catalog fetches, or real-network tests.
|
|
21
|
+
|
|
22
|
+
## Inputs / request
|
|
23
|
+
|
|
24
|
+
```ts
|
|
25
|
+
import {
|
|
26
|
+
createDeepSeekProviderPackage,
|
|
27
|
+
defineDeepSeekModel,
|
|
28
|
+
listDeepSeekModels,
|
|
29
|
+
} from "@arnilo/prism-provider-deepseek";
|
|
30
|
+
|
|
31
|
+
createDeepSeekProviderPackage(options: DeepSeekProviderPackageOptions): ProviderPackage
|
|
32
|
+
defineDeepSeekModel(config: DeepSeekModelConfig): ModelConfig
|
|
33
|
+
listDeepSeekModels(options?: ListDeepSeekModelsOptions): Promise<ModelConfig[]>
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
| Field | Type | Purpose |
|
|
37
|
+
| --- | --- | --- |
|
|
38
|
+
| `apiKey` | `CredentialValueSource` | Direct/callback/resolver API-key source. |
|
|
39
|
+
| `fetch` | `typeof fetch` | Optional fetch implementation for tests/hosts. |
|
|
40
|
+
| `baseUrl` | `string` | Overrides the DeepSeek base URL (default `https://api.deepseek.com`). |
|
|
41
|
+
| `id` | `string` | Overrides the provider id (default `deepseek`). |
|
|
42
|
+
| `models` | `readonly ModelConfig[]` | Overrides featured `deepseekModels` defaults. |
|
|
43
|
+
|
|
44
|
+
### Thinking / reasoning compat
|
|
45
|
+
|
|
46
|
+
Official body fields (request `options.compat` wins over `model.compat`):
|
|
47
|
+
|
|
48
|
+
| Compat / body field | Wire shape | Notes |
|
|
49
|
+
| --- | --- | --- |
|
|
50
|
+
| `thinking` | `boolean` or `{ type: "enabled" \| "disabled" }` | Default **enabled**. Boolean `true`/`false` maps to those types. |
|
|
51
|
+
| `reasoning_effort` | `low` \| `high` \| `max` | Default `high`. Portable `medium` and `xhigh` map to `high`. Omitted when thinking is disabled. |
|
|
52
|
+
|
|
53
|
+
`applyThinkingLevel(..., "thinking_type")` toggles `thinking.type`. Set
|
|
54
|
+
`reasoning_effort` in `compat` for effort. `ProviderRequestOptions.cacheRetention: "none"`
|
|
55
|
+
forces `thinking: { type: "disabled" }`.
|
|
56
|
+
|
|
57
|
+
Thinking mode ignores `temperature`, `top_p`, `presence_penalty`, and
|
|
58
|
+
`frequency_penalty`; this adapter strips them so they cannot break the cache prefix.
|
|
59
|
+
|
|
60
|
+
## Outputs / response / events
|
|
61
|
+
|
|
62
|
+
| Surface | Behavior |
|
|
63
|
+
| --- | --- |
|
|
64
|
+
| Provider stream | Prism text, thinking (`delta.reasoning_content`), tool-call delta/final, `usage`, `done`, redacted `error`. |
|
|
65
|
+
| Block preservation | Text; thinking → `reasoning_content` on tool-turn assistants (otherwise dropped, never flattened into text); assistant `tool_call` → `tool_calls`; `tool_result` → role `tool`. |
|
|
66
|
+
| Auth method | `api_key` for the configured provider id, credential name `apiKey`. |
|
|
67
|
+
| Usage | `prompt_cache_hit_tokens` → `Usage.cacheReadTokens` via `mapOpenAIChatUsage`. |
|
|
68
|
+
|
|
69
|
+
Unsupported media blocks fail before fetch. Text-only input.
|
|
70
|
+
|
|
71
|
+
## Request/response example
|
|
72
|
+
|
|
73
|
+
```json
|
|
74
|
+
{
|
|
75
|
+
"model": "deepseek-v4-flash",
|
|
76
|
+
"messages": [{ "role": "user", "content": "Hello" }],
|
|
77
|
+
"stream": true,
|
|
78
|
+
"thinking": { "type": "enabled" },
|
|
79
|
+
"reasoning_effort": "high"
|
|
80
|
+
}
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Implementation example
|
|
84
|
+
|
|
85
|
+
```ts
|
|
86
|
+
import { createExtensionKernel } from "@arnilo/prism";
|
|
87
|
+
import { createDeepSeekProviderPackage, listDeepSeekModels } from "@arnilo/prism-provider-deepseek";
|
|
88
|
+
|
|
89
|
+
const kernel = createExtensionKernel();
|
|
90
|
+
await kernel.load([createDeepSeekProviderPackage({ apiKey: "fake-deepseek-key" })]);
|
|
91
|
+
|
|
92
|
+
const live = await listDeepSeekModels({ apiKey: "fake-deepseek-key" });
|
|
93
|
+
await kernel.load([createDeepSeekProviderPackage({ apiKey: "fake-deepseek-key", models: live })]);
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Per-turn thinking override:
|
|
97
|
+
|
|
98
|
+
```ts
|
|
99
|
+
await session.prompt("Plan the refactor", {
|
|
100
|
+
providerOptions: {
|
|
101
|
+
compat: {
|
|
102
|
+
thinking: { type: "enabled" },
|
|
103
|
+
reasoning_effort: "low",
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
});
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## Extension and configuration notes
|
|
110
|
+
|
|
111
|
+
- Default base URL is `https://api.deepseek.com`. The Anthropic-compatible
|
|
112
|
+
route is not implemented.
|
|
113
|
+
- Featured `deepseekModels` are offline bootstrap aliases (`deepseek-v4-flash`,
|
|
114
|
+
`deepseek-v4-pro`) with 1M context / 384k max output, `cache.kind: "implicit"`,
|
|
115
|
+
and documented USD-per-million cost including cache-read.
|
|
116
|
+
- `listDeepSeekModels()` is caller-gated `GET {base}/models`. Setup never fetches.
|
|
117
|
+
- Tool JSON Schema keys (`properties` / `required`) are sorted before send so the
|
|
118
|
+
implicit prefix stays stable.
|
|
119
|
+
- Tool-turn assistants must replay `reasoning_content` or the API returns 400.
|
|
120
|
+
Non-tool multi-turn may omit it (the API ignores it).
|
|
121
|
+
|
|
122
|
+
## Security and performance notes
|
|
123
|
+
|
|
124
|
+
- SSE streams and HTTP error bodies use bounded transport helpers.
|
|
125
|
+
- No network calls during import, setup, build, or default tests.
|
|
126
|
+
- No automatic environment, file, keychain, or shell credential lookup.
|
|
127
|
+
- API keys are resolved per request and redacted from errors (including discovery).
|
|
128
|
+
- Provider-owned headers (`content-type`, `authorization`) win over caller headers.
|
|
129
|
+
- One POST per generate. No provider retry loop.
|
|
130
|
+
- Live tests stay opt-in behind `PRISM_LIVE_PROVIDER_TESTS=1` plus `DEEPSEEK_API_KEY`.
|
|
131
|
+
|
|
132
|
+
## Related APIs
|
|
133
|
+
|
|
134
|
+
- [Provider packages](../provider-packages.md): `defineProviderPackage`,
|
|
135
|
+
caller-gated discovery, per-turn thinking.
|
|
136
|
+
- [Thinking and reasoning](../thinking-and-reasoning.md): portable
|
|
137
|
+
`applyThinkingLevel` → DeepSeek `thinking.type` / `reasoning_effort`.
|
|
138
|
+
- [Credentials and redaction](../credentials-and-redaction.md):
|
|
139
|
+
`resolveCredentialValue`, `redactSecrets`.
|
|
140
|
+
- [Provider caching](../provider-caching.md): implicit DeepSeek prefix cache.
|
|
141
|
+
- [Provider conformance](../provider-conformance.md): network-free adapter tests.
|
|
142
|
+
|
|
143
|
+
## Official evidence
|
|
144
|
+
|
|
145
|
+
- [Thinking Mode](https://api-docs.deepseek.com/guides/thinking_mode)
|
|
146
|
+
- [KV Cache](https://api-docs.deepseek.com/guides/kv_cache)
|
|
147
|
+
- [Create Chat Completion](https://api-docs.deepseek.com/api/create-chat-completion)
|
package/docs/providers/openai.md
CHANGED
|
@@ -54,7 +54,7 @@ uses official Responses `reasoning: { effort, summary? }` via
|
|
|
54
54
|
| Continuation | An incomplete Responses stream self-resumes at most eight HTTP hops using opaque `previous_response_id`; a cursor is at most 4 KiB, is never replayed, and is observable as `continuation_required`. |
|
|
55
55
|
| Realtime | `createOpenAIRealtimeSession()` exposes server-session creation, audio in/out, transcript deltas, provider-hosted calls, interrupt, and idempotent close through the neutral `RealtimeSession` seam. |
|
|
56
56
|
| Block preservation | User/system text → `input_text`; assistant text → `output_text`; assistant host `tool_call` → top-level `function_call` with `call_id`; provider-hosted calls are not replayed; `tool_result` → top-level `function_call_output`; images/files/audio when declared on the model. Bare thinking without an encrypted Responses reasoning item is omitted on replay. |
|
|
57
|
-
| Auth methods | `api_key` for `openai`; host-invoked subscription `oauth` for `openai-codex`.
|
|
57
|
+
| Auth methods | `api_key` for `openai`; host-invoked subscription `oauth` for `openai-codex`. xAI SuperGrok is the other first-party subscription OAuth flow ([xAI](xai.md)). |
|
|
58
58
|
|
|
59
59
|
Unsupported block placements or unclaimed images fail before `fetch`. Provider-hosted calls are telemetry only: Prism never dispatches them as host tools or sends a `tool_result`.
|
|
60
60
|
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
# xAI provider package
|
|
2
|
+
|
|
3
|
+
## What it does
|
|
4
|
+
|
|
5
|
+
`@arnilo/prism-provider-xai` provides explicit, side-effect-free setup for the
|
|
6
|
+
xAI Grok Chat Completions API (`POST https://api.x.ai/v1/chat/completions`)
|
|
7
|
+
with implicit prefix caching via a sanitized `x-grok-conv-id` header, reasoning
|
|
8
|
+
replay, and host-invoked SuperGrok / X Premium OAuth.
|
|
9
|
+
|
|
10
|
+
The package registers a provider, featured Completions models, an `api_key`
|
|
11
|
+
auth method, and an `oauth` auth method (`createXaiOAuthProvider`, id `xai`).
|
|
12
|
+
|
|
13
|
+
## When to use it
|
|
14
|
+
|
|
15
|
+
Use it when a host wants Grok 4.6 / 4.3 / Build through Prism with either an
|
|
16
|
+
xAI API key or a SuperGrok / X Premium subscription login.
|
|
17
|
+
|
|
18
|
+
Do not use it for Responses-only `grok-4.5`, PKCE loopback, `cli-chat-proxy.grok.com`,
|
|
19
|
+
`~/.grok` credential import, or setup-time catalog fetches.
|
|
20
|
+
|
|
21
|
+
## Inputs / request
|
|
22
|
+
|
|
23
|
+
```ts
|
|
24
|
+
import {
|
|
25
|
+
createXaiOAuthProvider,
|
|
26
|
+
createXaiProviderPackage,
|
|
27
|
+
listXaiModels,
|
|
28
|
+
} from "@arnilo/prism-provider-xai";
|
|
29
|
+
|
|
30
|
+
createXaiProviderPackage(options: XaiProviderPackageOptions): ProviderPackage
|
|
31
|
+
createXaiOAuthProvider(options?: XaiOAuthOptions): OAuthProvider
|
|
32
|
+
listXaiModels(options?: ListXaiModelsOptions): Promise<ModelConfig[]>
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
| Field | Type | Purpose |
|
|
36
|
+
| --- | --- | --- |
|
|
37
|
+
| `apiKey` | `CredentialValueSource` | API key **or** SuperGrok access token (host wires after `login` / `refreshOAuthCredential`). |
|
|
38
|
+
| `fetch` | `typeof fetch` | Optional fetch for tests/hosts. |
|
|
39
|
+
| `baseUrl` | `string` | Default `https://api.x.ai/v1`. |
|
|
40
|
+
| `id` | `string` | Provider id (default `xai`). |
|
|
41
|
+
| `models` | `readonly ModelConfig[]` | Overrides featured `xaiModels`. |
|
|
42
|
+
| `oauth` | `XaiOAuthOptions` | Optional client id / endpoints / referrer overrides. |
|
|
43
|
+
|
|
44
|
+
### Cache header
|
|
45
|
+
|
|
46
|
+
`x-grok-conv-id` is `sanitizeCacheKey(cache.key ?? cacheKey ?? sessionId, 128)`.
|
|
47
|
+
Omitted when `cache.mode` is `off`, `cacheRetention` is `none`, or the key sanitizes empty.
|
|
48
|
+
|
|
49
|
+
### SuperGrok OAuth
|
|
50
|
+
|
|
51
|
+
RFC 8628 device-code. Default public client id
|
|
52
|
+
`b1a00492-073a-47ea-816f-4c329264a828` is **not a secret**. Scope
|
|
53
|
+
`openid profile email offline_access grok-cli:access api:access`. Referrer
|
|
54
|
+
default `prism`. Endpoints: `https://auth.x.ai/oauth2/device/code`,
|
|
55
|
+
`/token`, `/revoke`. Form-urlencoded bodies. `verification_uri` /
|
|
56
|
+
`verification_uri_complete` must be `https:`. Refresh keeps the previous
|
|
57
|
+
`refresh_token` when omitted and applies a 5-minute expiry skew. Revoke is
|
|
58
|
+
best-effort; `revokeOAuthCredential` still deletes the local store.
|
|
59
|
+
|
|
60
|
+
No PKCE loopback. Login requires `onDeviceCode`. Setup never logs in.
|
|
61
|
+
|
|
62
|
+
## Outputs / response / events
|
|
63
|
+
|
|
64
|
+
| Surface | Behavior |
|
|
65
|
+
| --- | --- |
|
|
66
|
+
| Provider stream | Prism text, thinking (`delta.reasoning_content` / `delta.reasoning`), tool-call, `usage`, `done`, redacted `error`. |
|
|
67
|
+
| Cache usage | `prompt_tokens_details.cached_tokens` → `cacheReadTokens`. If `cached_tokens > prompt_tokens` (exclusive report), values are kept as-is; unused input is not invented. |
|
|
68
|
+
| Auth | `api_key` and `oauth` (`getCredential` → `{ type: "bearer", value: access }`). |
|
|
69
|
+
| Images | Allowed when `capabilities.input` includes `image`. Rejected otherwise. |
|
|
70
|
+
|
|
71
|
+
## Request/response example
|
|
72
|
+
|
|
73
|
+
```json
|
|
74
|
+
{
|
|
75
|
+
"model": "grok-4.6",
|
|
76
|
+
"messages": [{ "role": "user", "content": "Hello" }],
|
|
77
|
+
"stream": true
|
|
78
|
+
}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Header: `x-grok-conv-id: sess-1`.
|
|
82
|
+
|
|
83
|
+
## Implementation example
|
|
84
|
+
|
|
85
|
+
```ts
|
|
86
|
+
import { createExtensionKernel, refreshOAuthCredential } from "@arnilo/prism";
|
|
87
|
+
import { createXaiOAuthProvider, createXaiProviderPackage } from "@arnilo/prism-provider-xai";
|
|
88
|
+
|
|
89
|
+
const kernel = createExtensionKernel();
|
|
90
|
+
await kernel.load([createXaiProviderPackage({ apiKey: "fake-xai-key" })]);
|
|
91
|
+
|
|
92
|
+
const oauth = createXaiOAuthProvider();
|
|
93
|
+
const creds = await oauth.login({
|
|
94
|
+
onDeviceCode: ({ userCode, verificationUri }) => {
|
|
95
|
+
console.log(`Open ${verificationUri} and enter ${userCode}`);
|
|
96
|
+
},
|
|
97
|
+
});
|
|
98
|
+
await store.set("xai", creds);
|
|
99
|
+
|
|
100
|
+
await kernel.load([
|
|
101
|
+
createXaiProviderPackage({
|
|
102
|
+
apiKey: async () => {
|
|
103
|
+
const current = await store.get("xai");
|
|
104
|
+
return (await refreshOAuthCredential({ provider: oauth, credentials: current, store })).access;
|
|
105
|
+
},
|
|
106
|
+
}),
|
|
107
|
+
]);
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
## Extension and configuration notes
|
|
111
|
+
|
|
112
|
+
- Featured Completions: `grok-4.6` (500k), `grok-4.3` (1M), `grok-build-0.1` (256k). All image + reasoning, `cache.kind: "implicit"`.
|
|
113
|
+
- `grok-4.5` / Responses API is not implemented.
|
|
114
|
+
- `listXaiModels()` is caller-gated `GET {base}/models`. Setup never fetches.
|
|
115
|
+
- Reasoning models replay `reasoning_content` and do not flatten thinking into text.
|
|
116
|
+
- Generate always hits `https://api.x.ai/v1/chat/completions` (same backend for API key and SuperGrok access).
|
|
117
|
+
|
|
118
|
+
## Security and performance notes
|
|
119
|
+
|
|
120
|
+
- Public client id is documented as not a secret. Device/user/access/refresh codes are redacted.
|
|
121
|
+
- HTTPS verification URI only. No PKCE loopback. No `~/.grok/**` or env scan.
|
|
122
|
+
- Provider-owned headers (`authorization`, `content-type`) win. Conv-id is never a credential.
|
|
123
|
+
- Bounded OAuth and API error bodies. No retry loop. No refresh timer.
|
|
124
|
+
- Live API-key smoke: `PRISM_LIVE_PROVIDER_TESTS=1` + `XAI_API_KEY`. SuperGrok login is operator-only (`PRISM_LIVE_XAI_OAUTH=1`).
|
|
125
|
+
|
|
126
|
+
## Related APIs
|
|
127
|
+
|
|
128
|
+
- [Provider packages](../provider-packages.md): OAuth support matrix.
|
|
129
|
+
- [Credentials and redaction](../credentials-and-redaction.md): SuperGrok is authorized; Claude/Gemini are not.
|
|
130
|
+
- [Credential storage](../credential-storage.md): host-owned store after explicit `login`.
|
|
131
|
+
- [Provider caching](../provider-caching.md): implicit xAI prefix cache + conv-id.
|
|
132
|
+
- [Thinking and reasoning](../thinking-and-reasoning.md): xAI reasoning replay.
|
|
133
|
+
- [OpenAI Codex](openai.md): the other first-party subscription OAuth flow.
|
|
134
|
+
|
|
135
|
+
## Official evidence
|
|
136
|
+
|
|
137
|
+
- [Prompt caching](https://docs.x.ai/developers/advanced-api-usage/prompt-caching)
|
|
138
|
+
- [OIDC discovery](https://auth.x.ai/.well-known/openid-configuration)
|