feat: per-model max output tokens and a conversation-time thinking level backed by agent settings (#28)
Co-authored-by: Alice <alice@prismshadow.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -76,6 +76,12 @@ function parseModelsUpdate(body: Record<string, unknown>): ModelsUpdateRequest {
|
||||
}
|
||||
entry.vision = m.vision;
|
||||
}
|
||||
if (m.maxTokens !== undefined) {
|
||||
if (typeof m.maxTokens !== "number" || !Number.isInteger(m.maxTokens) || m.maxTokens <= 0) {
|
||||
throw badRequest(`models[${i}].maxTokens must be a positive integer.`);
|
||||
}
|
||||
entry.maxTokens = m.maxTokens;
|
||||
}
|
||||
if (m.pricing !== undefined) {
|
||||
const p = m.pricing as Record<string, unknown>;
|
||||
if (p === null || typeof p !== "object" || Array.isArray(p)) {
|
||||
|
||||
Reference in New Issue
Block a user