feat(ai): preserve raw finish reasons (#38423)

This commit is contained in:
Aiden Cline 2026-07-23 18:16:11 -05:00 committed by GitHub
commit 6401eeaea0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
31 changed files with 410 additions and 133 deletions

View file

@ -1,4 +1,4 @@
import { LLMEvent, type FinishReason, type ProviderMetadata, type Usage } from "../../schema"
import { LLMEvent, type FinishReasonDetails, type ProviderMetadata, type Usage } from "../../schema"
export interface State {
readonly stepStarted: boolean
@ -81,7 +81,7 @@ export const finish = (
state: State,
events: LLMEvent[],
input: {
readonly reason: FinishReason
readonly reason: FinishReasonDetails
readonly usage?: Usage
readonly providerMetadata?: ProviderMetadata
},