GHHG10's picture
download
raw
936 Bytes
export function parseAnthropicVariant(body: any) {
const effort = body.effort ?? body.output_config?.effort ?? body.outputConfig?.effort ?? body.thinking?.effort
if (effort) return effort
const budget = body.thinking?.budget_tokens ?? body.thinking?.budgetTokens
if (body.thinking?.type !== "enabled" || typeof budget !== "number") return undefined
return budget > 16_000 ? "max" : "high"
}
export function parseGoogleVariant(body: any) {
const thinkingConfig = body.generationConfig?.thinkingConfig ?? body.thinkingConfig
if (thinkingConfig?.thinkingLevel) return thinkingConfig.thinkingLevel
const budget = thinkingConfig?.thinkingBudget ?? thinkingConfig?.thinking_budget
if (typeof budget !== "number" || budget <= 0) return undefined
return budget > 16_000 ? "max" : "high"
}
export function parseOpenAiVariant(body: any) {
return body.reasoningEffort ?? body.reasoning_effort ?? body.reasoning?.effort
}

Xet Storage Details

Size:
936 Bytes
·
Xet hash:
bce6a89740d139b08a74c7685644053b3f5bcdfb7508485ad625e879b5d068af

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.