fix: address self-review findings

This commit is contained in:
Matt Van Horn
2026-07-12 01:26:59 -07:00
parent f3a85558d8
commit d6bdb25f58
5 changed files with 54 additions and 3 deletions
+9
View File
@@ -1440,6 +1440,15 @@ export function supportsPromptCaching(modelId: string): boolean {
)
}
/**
* Check if a model supports the temperature sampling parameter.
* Claude Opus 4.7 and 4.8 reject sampling parameters entirely.
*/
export function supportsTemperature(modelId: string): boolean {
// Match plain, Bedrock inference-profile, and version-suffixed model IDs.
return !/claude-opus-4[.-](?:7|8)(?=$|[-.:])/i.test(modelId)
}
/**
* Get the AI model for diagram validation.
* Uses VALIDATION_MODEL env var if set, otherwise falls back to AI_MODEL.