Skip to main content
agentscope-extensions-model-openai integrates OpenAI Chat Completions-style models. It is also the module to use for OpenAI-compatible endpoints such as DeepSeek, GLM, Kimi, MiniMax, and similar services when their wire format follows the OpenAI API.

Add the dependency

ModelRegistry

Set OPENAI_API_KEY, then use the openai:<model> id:

Explicit builder

Use the builder when you need a custom endpoint, formatter, transport, or generation options:

Reasoning history

The formatter preserves reasoning detail blocks in conversation history, including encrypted data. When formatting the next request, it copies each detail without the optional index field, which strict OpenAI-compatible endpoints reject as a streaming-only field. The original response and persisted history retain their indexes; id, type, data, text, format, and block order are preserved in requests.

Spring Boot

Spring Boot applications can use the OpenAI starter:
Full builder options, formatters, credentials, and registry context details are covered in Model.