mirror of
https://github.com/NanmiCoder/cc-haha
synced 2026-07-18 13:23:33 +08:00
Tested: - bun test src/services/api/claudeEffort.test.ts src/server/__tests__/proxy-transform.test.ts src/utils/__tests__/thinking.test.ts - bun run check:server - git diff --check Not-tested: - bun run verify / coverage Confidence: high Scope-risk: narrow
14 lines
324 B
TypeScript
14 lines
324 B
TypeScript
import type { OpenAIReasoningEffort } from './types.js'
|
|
|
|
export function normalizeOpenAIReasoningEffort(
|
|
effort: unknown,
|
|
): OpenAIReasoningEffort | undefined {
|
|
if (effort === 'low' || effort === 'medium' || effort === 'high') {
|
|
return effort
|
|
}
|
|
if (effort === 'max') {
|
|
return 'high'
|
|
}
|
|
return undefined
|
|
}
|