fix(core): respect model input limits (#39797)

This commit is contained in:
Aiden Cline 2026-07-31 10:41:36 -05:00 committed by GitHub
commit 7129ed6e62
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 83 additions and 25 deletions

View file

@ -6,6 +6,7 @@ export interface Settings extends Readonly<Record<string, unknown>> {
readonly body?: Readonly<Record<string, unknown>>
readonly limits?: {
readonly context: number
readonly input?: number
readonly output: number
}
}

View file

@ -123,6 +123,7 @@ export const mergeGenerationOptions = (...items: ReadonlyArray<GenerationOptions
export class ModelLimits extends Schema.Class<ModelLimits>("LLM.ModelLimits")({
context: Schema.optional(Schema.Number),
input: Schema.optional(Schema.Number),
output: Schema.optional(Schema.Number),
}) {}