MCPcopy
hub / github.com/TanStack/ai / buildAdapter

Function buildAdapter

examples/sandbox-web/src/sandbox-agent.ts:266–277  ·  view source on GitHub ↗
(
  harness: HarnessName,
  grokOptions?: GrokHarnessOptions,
)

Source from the content-addressed store, hash-verified

264
265/** The harness adapter `chat()` runs for the chosen harness. */
266export function buildAdapter(
267 harness: HarnessName,
268 grokOptions?: GrokHarnessOptions,
269): AnyTextAdapter {
270 if (harness === 'grok') {
271 return grokBuildText(grokOptions?.model ?? 'composer-2.5', {
272 protocol: grokOptions?.protocol ?? 'acp',
273 transport: grokOptions?.transport ?? 'auto',
274 })
275 }
276 return HARNESSES[harness].makeAdapter()
277}
278
279/** Required env vars (harness + provider) that are not set in process.env. */
280export function missingEnv(

Callers 1

api.run.tsFile · 0.90

Calls 1

grokBuildTextFunction · 0.90

Tested by

no test coverage detected