mirror of
https://github.com/danielmiessler/fabric.git
synced 2026-09-10 07:36:44 -04:00
Merge pull request #2136 from ksylvan/opus-4-8-sampling-params-fix
chore: extend sampling param exclusion to Opus 4.8 models
This commit is contained in:
commit
8e452510e0
5
cmd/generate_changelog/incoming/2136.txt
Normal file
5
cmd/generate_changelog/incoming/2136.txt
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
### PR [#2136](https://github.com/danielmiessler/Fabric/pull/2136) by [ksylvan](https://github.com/ksylvan): chore: extend sampling param exclusion to Opus 4.8 models
|
||||
|
||||
- Extends the sampling parameter exclusion logic to cover Opus 4.8 models, ensuring consistent behavior alongside the existing Opus 4.7 exclusion.
|
||||
- Adds the `claude-opus-4-8` model prefix to the sampling parameter exclusion check.
|
||||
- Updates the associated code comment to explicitly reference Opus 4.8 models.
|
||||
|
|
@ -25,9 +25,9 @@ const webSearchToolType = "web_search_20250305"
|
|||
const sourcesHeader = "## Sources"
|
||||
|
||||
func modelDisallowsSamplingParams(model string) bool {
|
||||
// Anthropic's Opus 4.7 models reject non-default sampling parameters.
|
||||
// Anthropic's Opus 4.7 and Opus 4.8 models reject non-default sampling parameters.
|
||||
// Omit these params entirely for safest compatibility.
|
||||
return strings.HasPrefix(model, "claude-opus-4-7")
|
||||
return strings.HasPrefix(model, "claude-opus-4-7") || strings.HasPrefix(model, "claude-opus-4-8")
|
||||
}
|
||||
|
||||
func NewClient() (ret *Client) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue