Open Kortyx on GitHub

Choose a Provider

Updated 19 days ago • May 3, 2026

Kortyx provider packages let your app choose models explicitly at the useReason(...) call site.

Use this page to pick a package, set the right environment variables, and then jump into the provider-specific setup page.

Provider package map

ProviderPackageTypical first modelEnvironment variablesGood first fit
Google Gemini@kortyx/googlegemini-2.5-flashGOOGLE_API_KEY, GEMINI_API_KEY, GOOGLE_GENERATIVE_AI_API_KEY, KORTYX_GOOGLE_API_KEY, KORTYX_GEMINI_API_KEYGemini-first apps and Google AI Studio keys
OpenAI@kortyx/openaigpt-4.1-miniOPENAI_API_KEY, KORTYX_OPENAI_API_KEYOpenAI chat-completions models and GPT-family defaults
Anthropic@kortyx/anthropicclaude-sonnet-4-5ANTHROPIC_API_KEY, KORTYX_ANTHROPIC_API_KEY, ANTHROPIC_AUTH_TOKEN, KORTYX_ANTHROPIC_AUTH_TOKENClaude text generation and Anthropic thinking controls
DeepSeek@kortyx/deepseekdeepseek-chatDEEPSEEK_API_KEY, KORTYX_DEEPSEEK_API_KEYDeepSeek chat and reasoner models
Groq@kortyx/groqllama-3.3-70b-versatileGROQ_API_KEY, KORTYX_GROQ_API_KEYGroq-hosted low-latency model access
Mistral@kortyx/mistralmistral-large-latestMISTRAL_API_KEY, KORTYX_MISTRAL_API_KEYMistral, Magistral, Ministral, and Pixtral model families

Good to know: The model ids above are starter choices from the package autocomplete lists. Provider packages also accept arbitrary provider model id strings when the underlying API supports them.

Install the package you need

Install only the provider packages your app uses.

pnpm add @kortyx/google

Use the provider-specific page if you need package-specific install commands:

Centralize provider imports

Create one app-owned provider file so workflow and node code imports models from one place.

src/lib/providers.ts
export { google } from "@kortyx/google"; export { openai } from "@kortyx/openai"; export { anthropic } from "@kortyx/anthropic";

Then choose a model where your node actually reasons:

import { useReason } from "kortyx"; import { google } from "@/lib/providers"; const result = await useReason({ model: google("gemini-2.5-flash"), input: "Summarize this support ticket in one sentence.", emit: true, stream: true, });

Use explicit provider setup when the app owns config

The default provider exports read supported environment variables on first use. Use factory functions when your app needs explicit keys, custom API URLs, or a custom fetch.

src/lib/providers.ts
import { createGoogleGenerativeAI } from "@kortyx/google"; import { createOpenAI } from "@kortyx/openai"; export const google = createGoogleGenerativeAI({ apiKey: process.env.GOOGLE_API_KEY, }); export const openai = createOpenAI({ apiKey: process.env.OPENAI_API_KEY, baseUrl: process.env.OPENAI_BASE_URL, });

Good to know: Kortyx provider settings use baseUrl with a lowercase l. Some adjacent ecosystem docs use baseURL; keep the Kortyx spelling when configuring these packages.

Current provider scope

Kortyx provider packages currently focus on language model text generation through useReason(...).

They support:

  • model refs passed to useReason(...)
  • streaming and non-streaming text invocation
  • normalized usage, finishReason, providerMetadata, warnings, and raw
  • provider-specific options through providerOptions

They do not currently expose provider-native APIs for:

  • embeddings
  • image generation
  • audio, speech, or transcription
  • file upload APIs
  • provider-hosted tools or tool execution

Use result.warnings when you rely on advanced normalized options. Providers report unsupported or compatibility-mapped options there instead of silently pretending every provider behaves the same.

Provider options

Provider-specific options are usually namespaced under the provider id:

const result = await useReason({ model: openai("gpt-4.1-mini"), input: "Return a compact JSON summary.", responseFormat: { type: "json", }, providerOptions: { openai: { strictJsonSchema: true, }, }, });
const result = await useReason({ model: openai("gpt-4.1-mini"), input: "Return a compact JSON summary.", responseFormat: { type: "json", }, providerOptions: { openai: { strictJsonSchema: true, }, }, });
const result = await useReason({ model: deepseek("deepseek-reasoner"), input: "Solve this step by step.", providerOptions: { deepseek: { thinking: { type: "enabled", }, }, }, });

Next steps

  • Pick a provider-specific setup page from the package map above
  • See Hooks for useReason(...) behavior and structured output
  • See Provider API for the shared normalized provider contract