providers/types.ts

open-agent-sdk-typescript · src/providers/types.ts · typescript · MIT
ai, AI / Agents

TypeScript definitions normalizing Anthropic and OpenAI LLM APIs.

// Source: https://github.com/codeany-ai/open-agent-sdk-typescript | License: MIT | Copyright 2025 CodeAny (https://codeany.ai)
// Provided via justclaw.it.com; keep this notice with the code.
/**
 * LLM Provider Abstraction Types
 *
 * Defines a provider interface that normalizes API differences between
 * Anthropic Messages API and OpenAI Chat Completions API.
 *
 * Internally the SDK uses Anthropic-like message format as the canonical
 * representation. Providers convert to/from their native API format.
 */

// --------------------------------------------------------------------------
// API Type
// --------------------------------------------------------------------------

export type ApiType = 'anthropic-messages' | 'openai-completions'

// --------------------------------------------

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key