@nhtio/adk/batteries/llm/openai_chat_completions/types
TypeScript wire shapes, helper contracts, and option types for the Chat Completions battery.
Remarks
Shared TypeScript type aliases for the OpenAI Chat Completions adapter — wire shapes, helper input/output shapes, and the adapter's options shape. These are documentation-level types only; runtime validation lives in validation.ts (openAIChatCompletionsOptionsSchema).
Interfaces
| Interface | Description |
|---|---|
| AssembledToolCall | An assembled tool call ready for execution. |
| ChatCompletionsChunk | Streaming chunk response from a chat completion API. |
| ChatCompletionsChunkChoice | A choice option in a streaming chat completions chunk. |
| ChatCompletionsChunkDelta | Stream delta payload for a chat completion choice chunk. |
| ChatCompletionsHelpers | Full translation-helper contract for the OpenAI Chat Completions battery. |
| ChatCompletionsMessage | Chat completion message wire object. |
| ChatCompletionsResponse | Non-streaming chat completion response payload. |
| ChatCompletionsResponseChoice | A choice returned in non-streaming chat completions. |
| ChatCompletionsResponseMessage | A message response in non-streaming chat completions. |
| ChatCompletionsToolCallDelta | Part of a tool call in a streaming response. |
| ChatCompletionsToolCallDeltaAccumulator | Accumulator for stitching together streaming tool call deltas into fully-assembled tool calls. |
| ChatCompletionsToolCallWire | Wire representation of a tool call in a chat completion response or request. |
| OpenAIChatCompletionsAdapterOptions | Configuration options for the OpenAI Chat Completions adapter. |
| OpenAIChatCompletionsRequestBody | Request body structure for the OpenAI Chat Completions API. |
| ReasoningExtract | A single reasoning trace extracted from a response message or stream delta — the wire field it came from and its content. Returned by extractReasoningFields. |
Type Aliases
| Type Alias | Description |
|---|---|
| ChatCompletionsContentBlock | Discriminated union of content block shapes accepted by the OpenAI Chat Completions wire format for a content-array message body. |
| ReasoningField | A wire field name that may carry model reasoning/thinking output on an OpenAI-compatible Chat Completions response. |
| ReasoningFieldPrecedence | Ordered precedence list of reasoning wire fields. See OpenAIChatCompletionsAdapterOptions.reasoningFieldPrecedence. |
References
ChatCompletionsBucketLabel
Re-exports ChatCompletionsBucketLabel
ChatCompletionsBucketOrder
Re-exports ChatCompletionsBucketOrder
ChatCompletionsRetryConfig
Re-exports ChatCompletionsRetryConfig
ChatCompletionsTool
Re-exports ChatCompletionsTool
DescriptionLike
Re-exports DescriptionLike
JsonSchema
Re-exports JsonSchema
MemoryAttrs
Re-exports MemoryAttrs
RetrievableAttrs
Re-exports RetrievableAttrs
StandingInstructionAttrs
Re-exports StandingInstructionAttrs
ThoughtAttrs
Re-exports ThoughtAttrs
ToolCallIdFilterFn
Re-exports ToolCallIdFilterFn
ToolCallParserFn
Re-exports ToolCallParserFn
ToolCallParserName
Re-exports ToolCallParserName
TrustedContentAttrs
Re-exports TrustedContentAttrs
UnsupportedMediaPolicy
Re-exports UnsupportedMediaPolicy
UntrustedContentAttrs
Re-exports UntrustedContentAttrs