Skip to content

Provider Comparison ​

This library currently ships first-party adapters for Anthropic, OpenAI, and Google Gemini.

Capability Matrix ​

ProviderSelected seeded completion modelsStreamingTool callingVision inputsSession persistenceNotes
Anthropicclaude-fable-5-2, claude-opus-5-5, claude-sonnet-5-5, claude-haiku-5-5YesYesYesVia Conversation + session storesNative thinking modes and effort depend on the model. Cache read/write pricing is modeled separately.
OpenAIgpt-6-astra, gpt-6.1-sol, gpt-6.1-terra, gpt-6-lunaYesYesYesVia Conversation + session storesUses the stateless Responses API with store: false. Reasoning effort and sampling restrictions depend on the model.
Google Geminigemini-4-carbon, gemini-4-argon, gemini-4-hydrogen, gemini-3.8-flashYesYesYesVia Conversation + session storesStreaming uses streamGenerateContent. Gemini 4 uses implicit caching and thinking levels rather than token budgets.

These are selected checked-in models, not the provider's full live catalog. See the model catalog for pricing, lifecycle changes, and older models. Use client.models.listRemote({ provider }) for discovery against the provider's broader model list; discovery does not add adapter capabilities.

Translation Differences ​

Switching response features ​

The following table describes this library's adapter coverage. Provider API availability alone does not mean a feature is exposed by this library.

FeatureOpenAIAnthropicGoogle Gemini
Canonical PDF inputYes, vision modelsYes, vision modelsYes, vision models
Explicit response verbosityCompatible GPT-5/GPT-6 modelsNo equivalent mappingNo equivalent mapping
Canonical reasoningSummary fieldCompatible reasoning modelsNot exposedNot exposed
Reasoning stream eventsRequested provider summariesThinking blocks not exposed as canonical reasoning eventsRequested thought text
Native reasoning controlsopenai.reasoninganthropic.thinking / effortgoogle.thinking
Canonical video inputNot implementedNot implementedNot implemented
Canonical token probabilities / logprobsNot implementedNot implementedNot implemented

Use client.models.getResponseCapabilities(modelId) to inspect PDF, verbosity, and canonical summary support for a resolved registered model. Reusing OpenAI verbosity/reasoning settings on an incompatible model fails clearly by default. Set providerOptions.unsupportedFeaturePolicy: 'omit' to explicitly drop those unsupported controls on that attempt. PDF content remains intact and must be supported by the selected model. See model switching for fallback and persistence behavior. Token probabilities describe token likelihood, not the factual correctness of an answer, and are separate from reasoning.

Wire formats ​

ConcernAnthropicOpenAIGemini
System prompt handlingLifted into system blocksFlattened into top-level instructionsLifted into systemInstruction
Assistant role nameassistantassistantmodel
Tool call payloadtool_use blocksfunction_call.arguments JSON string with call_idfunctionCall.args object
Tool result payloadtool_result block in a user turnfunction_call_output item keyed by call_idfunctionResponse part in a user turn
Streaming terminatorSSE close / message_stopresponse.completed / stream closeSSE close on dedicated stream endpoint

Choosing a Provider ​

  • Choose OpenAI when you want Responses-first model coverage, automatic prompt caching on supported models, and the broadest ecosystem compatibility.
  • Choose Anthropic when long-context tool workflows or prompt caching behavior are central to the workload.
  • Choose Gemini when you need a single provider surface that is comfortable with mixed text, vision, document, and audio inputs.

Operational Notes ​

  • All three adapters normalize token usage into a shared UsageMetrics shape and estimate cost from the model registry.
  • All three adapters map auth, rate-limit, context-window, and generic provider failures into typed LLMError subclasses.
  • OpenAI and Gemini cached-read usage is priced separately from uncached input when the provider returns cached-token counts. OpenAI cached-write counts are also normalized and priced separately when returned.
  • Live-provider smoke tests can be executed with LIVE_TESTS=1 pnpm test:live after populating .env.
  • Deeper real-service integration checks can be executed with pnpm test:real:providers or pnpm test:real after populating .env. These are intentionally opt-in because they consume provider quota and can fail for account-state reasons such as Anthropic low credits or Gemini rate limits.

Provider-agnostic LLM tooling for TypeScript applications.