provider/completion-types.ts

atomic-agent · src/llm/provider/completion-types.ts · typescript · MIT
ai

* Shared completion request/response shapes for every text LLM provider. `LlamaServerClient` and cloud adapters both speak this surface so the agent loop stays provider-agnostic above the registry seam. /

// Source: https://github.com/AtomicBot-ai/atomic-agent | License: MIT | Copyright 2026 Atomic Bot
// Provided via justclaw.it.com; keep this notice with the code.
/**
 * Shared completion request/response shapes for every text LLM provider.
 * `LlamaServerClient` and cloud adapters both speak this surface so the
 * agent loop stays provider-agnostic above the registry seam.
 */

export type ToolCallTransport = "grammar" | "native_tools";

/**
 * How hard a reasoning model may think for one completion. Mapped per
 * provider family in the body builder (OpenRouter `reasoning.effort`,
 * OpenAI-compatible `reasoning_effort`); providers without a mapping
 * ignore it.
 */
export type ReasoningEffort = "low" | "medium" | "high";

export interface CompletionUsage {
  promptTokens: number;
  com

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

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

Get a free API key