feat(models): add model-aware runtime metadata

This commit is contained in:
Patrick Wozniak
2026-08-07 14:03:24 +02:00
parent 8562009202
commit 7e9ecc563a
9 changed files with 1046 additions and 51 deletions
+9
View File
@@ -72,6 +72,13 @@ export interface ModelLike {
provider: string
maxTokens: number
cost: ModelCost
reasoning?: boolean
thinkingLevelMap?: Partial<Record<string, string | null>>
thinking?: {
effortMap?: Partial<Record<string, string | null>>
efforts?: readonly string[]
defaultLevel?: string
}
}
export interface MessageLike {
@@ -104,6 +111,8 @@ export interface StreamOptions {
signal?: AbortSignal
headers?: Record<string, string>
maxTokens?: number
/** Resolved pi thinking level; forwarded only through the model's map. */
reasoning?: string
onPayload?: (payload: unknown, model: ModelLike) => unknown | Promise<unknown>
onResponse?: (response: ProviderResponseInfo, model: ModelLike) => void | Promise<void>
/**