Agent skill · Audited from source
Adapter Configuration
skill · TanStack/aiMIT licenceAudited 8 Oct 2026 · source dafe8ab3bd88
Is it safe? Yes — SAFE, grade B (89/100). We read this skill's source at commit dafe8ab3bd88 and found no filesystem, network or shell access and no hard-coded secrets. What it does: Provider adapter selection and configuration: openaiText, anthropicText, geminiText, ollamaText, grokText, groqText, openRouterText, bedrockText, byteplusText, openaiCompatible. Per-model type safety with modelOptions,…
Cite
Cite this page
ModelsAtlas. “Adapter Configuration (TanStack/ai)”. Retrieved 8 Oct 2026. https://modelsatlas.com/skills/tanstack/adapter-configuration
Trust audit
Audit 0.4.1 · source read 8 Oct 2026
SAFE means nothing in the source contradicts what the skill says it does. Grade B is shared by 17,406 of 18,389 audited skills.
What the source does
- FilesystemNone observedNo reads or writes in the source
- NetworkNone observedNo outbound calls in the source
- ShellNone observedNo commands run in the source
- DependenciesPinnedNothing floats
- SecretsNone foundNo keys in source
Five audit layers
| Layer | What we check | Result | Findings |
|---|---|---|---|
L0 Provenance | Repo owner, licence, archive status, activity | PASS | 0 |
L1 Static source | Secrets, path traversal, supply chain, hidden code | NA | 0 |
L2 Instructions | Prompt injection, authority framing, hidden directives | PASS | 0 |
L3 Inventory | The files and declarations match the source | PASS | 0 |
L4 Sandbox | Run in isolation and watch behaviour | SKIPPED why | 0 |
Gates applied: no behavioural pass.
Findings (0)
No findings at any severity. We re-audit when the source changes.
Audit 0.4.1 · source sha dafe8ab3bd88 · 8 Oct 2026Report an issue or request a re-scan
Provenance
Who published it, and what the verdict is pinned to
- PublisherTanStack GitHub organizationOwner of the repository this skill is read from
- Source folderTanStack/ai/packages/ai/skills/ai-core/adapter-configurationThe exact folder we audited
- LicenceMITAs the repository states it
- Commit pinned for this verdictdafe8ab3bd88A new audit runs when the source changes
- Repository statusNot archivedPushed today
- Sandboxed runNot runSkills are read, not executed; layer L4 is skipped
What it tells the agent
Full source on GitHub ↗Its description: Provider adapter selection and configuration: openaiText, anthropicText, geminiText, ollamaText, grokText, groqText, openRouterText, bedrockText, byteplusText, openaiCompatible. Per-model type safety with modelOptions,…
---
name: ai-core/adapter-configuration
description: >
Provider adapter selection and configuration: openaiText, anthropicText,
geminiText, ollamaText, grokText, groqText, openRouterText, bedrockText,
byteplusText, openaiCompatible. Per-model type safety with modelOptions,
reasoning/thinking configuration,
runtime adapter switching, extendAdapter() for custom models, createModel().
Generic OpenAI-compatible providers (DeepSeek, Together, Fireworks, etc.) via
openaiCompatible({ baseURL, apiKey, models }) from @tanstack/ai-openai/compatible.
API key env vars: OPENAI_API_KEY, ANTHROPIC_API_KEY, GOOGLE_API_KEY/GEMINI_API_KEY,
XAI_API_KEY, GROQ_API_KEY, OPENROUTER_API_KEY, OLLAMA_HOST,
BEDROCK_API_KEY (or AWS_BEARER_TOKEN_BEDROCK). BytePlus needs TWO keys:
ARK_API_KEY (ModelArk — chat/video/image) and BYTEPLUS_VOICE_API_KEY
(Seed Speech — TTS/transcription); neither is a fallback for the other.
type: sub-skill
library: tanstack-ai
library_version: '0.42.0'
sources:
- 'TanStack/ai:docs/adapters/openai.md'
- 'TanStack/ai:docs/adapters/anthropic.md'
- 'TanStack/ai:docs/adapters/gemini.md'
- 'TanStack/ai:docs/adapters/ollama.md'
- 'TanStack/ai:docs/advanced/per-model-type-safety.md'
- 'TanStack/ai:docs/advanced/runtime-adapter-switching.md'
- 'TanStack/ai:docs/advanced/extend-adapter.md'
---
# Adapter Configuration
> **Dependency:** This skill builds on ai-core. Read it first for critical rules.
> **Before implementing:** Ask the user which provider and model they want.
> Then fetch the latest available models from the provider's source code
> (check the adapter's model metadata file, e.g. `packages/ai-openai/src/model-meta.ts`)
> or from the provider's API/docs to recommend the most current model.
> The model lists in this skill and its reference files may be outdated.
> Always verify against the source before recommending a specific model.
## Setup
Create an adapter and use it with `chat()`:
```typescript
import { chat, toServerSentEventsResponse } from '@tanstack/ai'
import { openaiText } from '@tanstack/ai-openai'
export async function POST(request: Request) {
const { messages } = await request.json()
const stream = chat({
adapter: openaiText('gpt-5.2'),
messages,
modelOptions: {
temperature: 0.7,
max_output_tokens: 1000,
},
})
return toServerSentEventsResponse(stream)
}
```
The adapter factory function takes the model name as a string literal and an
optional config object (API key, base URL, etc.). The model name is passed
into the factory, not into `chat()`.
Sampling options (`temperature`, token limits, `top_p`/`topP`, etc.) live
inside `modelOptions` using each provider's native key — they are **not**
top-level options on `chat()`. See the per-provider table in
[Configuring Sampling](#5-configuring-sampling) below.
## Core Patterns
### 1. Adapter Selection
Each provider has a dedicated package with tree-shakeable adapter factories.
The text adapter is the primary one for chat/completions:
| Provider | Package | Factory | Env Var |
| ----------------- | -------------------------------- | ------------------------------------------- | -------------------------------------------------------------------------------------- |
| OpenAI | `@tanstack/ai-openai` | `openaiText` | `OPENAI_API_KEY` |
| Anthropic | `@tanstack/ai-anthropic` | `anthropicText` | `ANTHROPIC_API_KEY` |
| Gemini | `@tanstack/ai-gemini` | `geminiText` | `GOOGLE_API_KEY` or `GEMINI_API_KEY` |
| Grok (xAI) | `@tanstack/ai-grok` | `grokText` | `XAI_API_KEY` |
| Groq | `@tanstack/ai-groq` | `groqText` | `GROQ_API_KEY` |
| OpenRouter | `@tanstack/ai-openrouter` | `openRouterText` | `OPENROUTER_API_KEY` |
| Ollama | `@tanstack/ai-ollama` | `ollamaText` | `OLLAMA_HOST` (default: `http://localhost:11434`) |
| Bedrock | `@tanstack/ai-bedrock` | `bedrockText` | `BEDROCK_API_KEY` or `AWS_BEARER_TOKEN_BEDROCK` |
| BytePlus | `@tanstack/ai-byteplus` | `byteplusText` | `ARK_API_KEY` (falls back to `BYTEPLUS_API_KEY`) |
| OpenAI-compatible | `@tanstack/ai-openai/compatible` | `openaiCompatible` / `openaiCompatibleText` | provider-specific (passed via `apiKey`) |
| Cloudflare | `@tanstack/ai-cloudflare` | `cloudflareText` | `CLOUDFLARE_ACCOUNT_ID` + `CLOUDFLARE_API_TOKEN`, or `{ binding: env.AI }` in a Worker |
> **BytePlus uses two keys.** `byteplusText` / `byteplusVideo` /
> `byteplusImage` read `ARK_API_KEY` (ModelArk, `Authorization: Bearer`), but
> `byteplusSpeech` / `byteplusTranscription` are a separate product and read
> **`BYTEPLUS_VOICE_API_KEY`** (Seed Speech, `X-Api-Key`). Ark keys are also
> region-isolated — the default base URL is the ap-southeast endpoint.
```typescript
// Each factory takes model as first arg, optional config as second
import { openaiText, cExcerpt, first 6,000 characters of SKILL.md, verbatim from the audited commit. It is text from someone else’s repository, quoted so you can judge it before your agent reads it.
Install
Pinned to the audited commit dafe8ab
git clone https://github.com/TanStack/ai git -C ai checkout dafe8ab3bd88
The author documents no install command, so this uses the repository directly. Our verdict covers commit dafe8ab3bd88 only.
Works in which agents?
What its own text says, not a test
| Agent | Status | More |
|---|---|---|
| Codex | Mentioned in its text, not tested | Skills for Codex · About Codex |
Audit history
Every audit, every source change
- ✓SAFE B 89 / 100
first audit · source
dafe8ab3bd88
README badge
For maintainers · shows the latest audit
[](https://modelsatlas.com/skills/tanstack/adapter-configuration/)
The badge shows our verdict and grade for this skill, and links back to this page. It changes when the audit does.
Similar skills
TanStack/ai
Server-side AG-UI streaming protocol implementation: StreamChunk event types (RUN_STARTED, TEXT_MESSAGE_START/CONTENT/END, TOOL_CALL_START/ARGS/END, RUN_FINISHED, RUN_ERROR, STEP_STARTED/STEP_FINISHED,…
TanStack/ai
Entry point for TanStack AI skills. Routes to chat-experience, tool-calling, media-generation, structured-outputs, adapter-configuration, ag-ui-protocol, middleware, locks, custom-backend-integration, and debug-logging,…
TanStack/ai
End-to-end chat implementation: server endpoint with chat() and toServerSentEventsResponse(), client-side useChat hook with fetchServerSentEvents(), message rendering with UIMessage parts, multimodal content,…
TanStack/ai
Connect useChat to a non-TanStack-AI backend through custom connection adapters. ConnectConnectionAdapter (single async iterable) vs SubscribeConnectionAdapter (separate subscribe/send). Customize…
TanStack/ai
Pluggable, category-toggleable debug logging for TanStack AI activities. Toggle with `debug: true | false | DebugConfig` on chat(), summarize(), generateImage(), generateSpeech(), generateTranscription(),…
TanStack/ai
Audit TanStack AI provider adapters for feature parity gaps and outdated model lists. Triggered as /gap-analysis <provider|feature <name>|models|--all>. Produces a dated markdown report under .agent/gap-analysis/.…
Add this badge to your README
[](https://modelsatlas.com/skills/tanstack/adapter-configuration/)
<a href="https://modelsatlas.com/skills/tanstack/adapter-configuration/"><img src="https://modelsatlas.com/skills/tanstack/adapter-configuration/badge.svg" alt="ModelsAtlas: SAFE B"></a>
Questions about Adapter Configuration
What does the Adapter Configuration skill do?
Is Adapter Configuration safe to install?
What can Adapter Configuration access on my machine?
Which assistants does Adapter Configuration work with?
How current is this page?
Sources
- github.com/TanStack/ai/tree/main/packages/ai/skills/ai-core/adap — the audited source at commit dafe8ab3bd88 and every finding aboveObserved · 8 Oct 2026
Spotted something wrong? Report a correction · Methodology
Keep going in your AI
Opens with this page as the source. We add nothing else to the prompt.
- What does the Adapter Configuration skill do?
- Is Adapter Configuration safe to install?
- What can Adapter Configuration access on my machine?