Class References
Function References
- text
- textOptions
- combineStrategies
- convertMessagesToModelMessages
- convertZodToJsonSchema
- createReplayStream
- embedding
- generateMessageId
- maxIterations
- messages
- modelMessageToUIMessage
- modelMessagesToUIMessages
- normalizeToUIMessage
- parsePartialJSON
- summarize
- toServerSentEventsStream
- toServerSentEventsResponse
- toolDefinition
- uiMessageToModelMessages
- realtimeToken
- untilFinishReason
Interface References
- AIAdapter
- AIAdapterConfig
- AgentLoopState
- AudioPart
- AudioVisualization
- BaseStreamChunk
- TextCompletionChunk
- TextOptions
- ChunkRecording
- ChunkStrategy
- ClientTool
- ContentPartSource
- ContentStreamChunk
- DefaultMessageMetadataByModality
- DocumentPart
- DoneStreamChunk
- EmbeddingOptions
- EmbeddingResult
- ErrorStreamChunk
- ImagePart
- InternalToolCallState
- JSONParser
- ModelMessage
- ProcessorResult
- ProcessorState
- RealtimeAdapter
- RealtimeClientOptions
- RealtimeConnection
- RealtimeMessage
- RealtimeSessionConfig
- RealtimeToken
- RealtimeTokenAdapter
- RealtimeTokenOptions
- ResponseFormat
- ServerTool
- StreamProcessorEvents
- StreamProcessorHandlers
- StreamProcessorOptions
- SummarizationOptions
- SummarizationResult
- TextPart
- ThinkingPart
- ThinkingStreamChunk
- Tool
- ToolCall
- ToolCallPart
- ToolCallStreamChunk
- ToolConfig
- ToolDefinition
- ToolDefinitionConfig
- ToolDefinitionInstance
- ToolInputAvailableStreamChunk
- ToolResultPart
- ToolResultStreamChunk
- UIMessage
- VideoPart
Type Alias References
- AgentLoopStrategy
- AnyClientTool
- TextStreamOptionsForModel
- TextStreamOptionsUnion
- ConstrainedContent
- ConstrainedModelMessage
- ContentPart
- ContentPartForModalities
- ExtractModalitiesForModel
- ExtractModelsFromAdapter
- InferToolInput
- InferToolName
- InferToolOutput
- MessagePart
- RealtimeEvent
- RealtimeMessagePart
- RealtimeMode
- RealtimeStatus
- ModalitiesArrayToUnion
- Modality
- StreamChunk
- ToolCallState
- ToolResultState
Variable References
EvaluateError
Defined in: packages/ai/src/activities/evaluate/adapter.ts:171
Thrown by an evaluate adapter when the provider answered, but the call cannot become a result. It carries what the provider already returned, so callers can still read the billed usage and the answers that came back.
The name is always EvaluateError. Another package can read this shape without an import of this class. Use isEvaluateError to narrow a caught value. instanceof fails when the app has more than one copy of @tanstack/ai.
Extends#
- Error
Constructors#
Constructor#
new EvaluateError(init): EvaluateError;Defined in: packages/ai/src/activities/evaluate/adapter.ts:185
Parameters#
init#
Returns#
EvaluateError
Overrides#
Error.constructorProperties#
answers?#
readonly optional answers?: Record<string, WireAnswer>;Defined in: packages/ai/src/activities/evaluate/adapter.ts:183
Wire answers the provider did return, before decide() maps them. A choice() answer has choice, and a boolean() answer is { type: 'noul', noul }. A refused question has no key.
code#
readonly code: string;Defined in: packages/ai/src/activities/evaluate/adapter.ts:173
Stable code to branch on, for example EVALUATE_REFUSAL_CODE.
model?#
readonly optional model?: string;Defined in: packages/ai/src/activities/evaluate/adapter.ts:177
Resolved model id from the provider.
usage?#
readonly optional usage?: TokenUsage<ProviderUsageDetails>;Defined in: packages/ai/src/activities/evaluate/adapter.ts:175
Tokens the provider reported for this call.