Skip to main content

Module openai

Module openai 

Source
Expand description

OpenAI Provider Implementation

This module provides the OpenAI API integration, supporting:

  • Chat Completions API (GPT-5, GPT-5-mini, etc.)
  • Responses API (GPT-5, GPT-5.1 Codex, etc.)
  • Harmony encoding for GPT-OSS models
  • Streaming and non-streaming responses
  • Tool/function calling
  • Reasoning models with effort configuration

§Module Structure

The OpenAI provider is split into focused submodules:

  • types - Shared types and constants
  • errors - Error handling and formatting
  • streaming - Stream processing and telemetry
  • responses_api - Responses API payload handling
  • provider - Main OpenAIProvider implementation

§Example

ⓘ
use vtcode_core::llm::providers::OpenAIProvider;

let provider = OpenAIProvider::new("sk-...".to_string());

Modules§

streaming
OpenAI streaming telemetry and utilities.
types
OpenAI provider types and constants.

Structs§

CustomProviderAuthHandle
OpenAIProvider