Husam
84709a00d9
fix(llm): omit temperature for major-only Opus ids (claude-opus-5) ( #5761 )
...
The version pattern in _anthropic_rejects_temperature() required a minor
component, so major-only ids like `claude-opus-5` never matched and the
guard reported that the model accepts `temperature`. Anthropic rejects the
field outright on Opus 4.7+, so every such call returned HTTP 400 and the
stream aborted with zero tokens ("the model returned an empty response").
Make the minor optional and read a missing minor as `.0`. The major is also
capped at 1-2 digits with a no-trailing-digit lookahead, mirroring the
minor: once the minor is optional, a greedy major would swallow the date in
`claude-3-opus-20240229` and read it as version 20240229, dropping
temperature from a model that accepts it.
Fixes #5753
Co-authored-by: Alexandre Teixeira <111787685+alteixeira20@users.noreply.github.com >
2026-07-30 11:30:00 +01:00
..
2026-07-23 14:49:02 +00:00
2026-07-18 09:40:58 +01:00
2026-06-04 18:57:24 +02:00
2026-07-23 14:49:02 +00:00
2026-07-23 14:49:02 +00:00
2026-07-27 17:29:29 +02:00
2026-06-19 00:34:30 +00:00
2026-07-23 14:49:02 +00:00
2026-06-23 23:28:53 +02:00
2026-06-23 16:12:32 +02:00
2026-07-11 15:14:14 +01:00
2026-05-31 23:58:26 +09:00
2026-07-11 15:14:14 +01:00
2026-06-07 12:55:01 +02:00
2026-06-19 00:28:22 -07:00
2026-06-15 15:03:09 +09:00
2026-07-23 14:49:02 +00:00
2026-07-23 14:49:02 +00:00
2026-07-11 13:03:24 +01:00
2026-07-11 13:03:24 +01:00
2026-07-11 15:14:14 +01:00
2026-06-08 21:33:29 +02:00
2026-07-23 14:49:02 +00:00
2026-06-09 10:16:38 +09:00
2026-06-01 22:22:41 +09:00
2026-06-03 14:14:27 +09:00
2026-07-11 17:06:19 +01:00
2026-07-17 16:22:02 -05:00
2026-06-29 19:56:17 +01:00
2026-07-23 14:49:02 +00:00
2026-06-27 13:05:44 +00:00
2026-07-08 23:57:23 +02:00
2026-05-31 23:58:26 +09:00
2026-06-10 12:08:22 +01:00
2026-07-01 10:11:22 +00:00
2026-07-08 21:04:15 +02:00
2026-06-03 14:06:31 +09:00
2026-06-09 10:40:17 +02:00
2026-06-26 14:21:27 +01:00
2026-07-20 16:43:47 +02:00
2026-06-08 09:58:52 +02:00
2026-06-24 16:50:07 +02:00
2026-06-08 09:58:52 +02:00
2026-06-06 03:37:10 -06:00
2026-06-30 19:54:51 +02:00
2026-07-23 14:49:02 +00:00
2026-07-23 14:18:08 +02:00
2026-07-05 03:44:19 +03:00
2026-07-07 00:50:07 +00:00
2026-07-30 11:30:00 +01:00
2026-06-10 15:15:13 +09:00
2026-07-13 08:56:46 +02:00
2026-07-11 05:26:23 +01:00
2026-06-04 16:26:11 +01:00
2026-06-06 03:17:19 -06:00
2026-06-04 05:31:15 +01:00
2026-07-18 09:40:58 +01:00
2026-06-30 18:04:29 +01:00
2026-06-27 16:25:15 +01:00
2026-06-15 21:20:15 +09:00
2026-06-15 15:16:41 +09:00
2026-06-10 10:41:52 +02:00
2026-05-31 23:58:26 +09:00
2026-06-01 18:27:17 +09:00
2026-07-23 14:18:08 +02:00
2026-06-08 19:16:37 +02:00
2026-06-27 13:50:04 +01:00
2026-07-03 15:07:16 +01:00
2026-06-15 17:44:10 +01:00
2026-07-23 14:18:08 +02:00
2026-05-31 23:58:26 +09:00
2026-06-02 23:33:22 +09:00
2026-06-10 15:15:13 +09:00
2026-05-31 23:58:26 +09:00
2026-06-11 01:17:02 +02:00
2026-06-03 13:42:24 +09:00
2026-06-15 17:44:10 +01:00
2026-06-08 09:58:52 +02:00
2026-06-09 16:00:24 +01:00
2026-06-09 01:06:20 +01:00
2026-07-23 14:49:02 +00:00
2026-06-27 13:05:44 +00:00
2026-06-11 12:53:33 +02:00
2026-07-23 14:49:02 +00:00
2026-07-05 13:19:04 +01:00
2026-07-07 00:50:07 +00:00
2026-07-07 00:51:34 +00:00
2026-06-28 00:48:35 +01:00
2026-06-27 10:12:28 -07:00
2026-06-04 13:18:50 +01:00
2026-07-23 14:49:02 +00:00
2026-06-28 14:07:23 +00:00
2026-07-23 14:49:02 +00:00
2026-07-23 14:49:02 +00:00
2026-07-12 08:20:59 +02:00
2026-07-23 14:49:02 +00:00
2026-07-23 14:49:02 +00:00
2026-07-11 15:14:14 +01:00
2026-06-02 20:44:27 +09:00
2026-07-11 15:14:14 +01:00
2026-06-09 01:24:30 +02:00
2026-07-18 12:36:27 -06:00
2026-06-03 22:47:00 +09:00
2026-06-28 00:05:02 +01:00
2026-06-27 17:44:32 +01:00
2026-07-04 17:03:38 +01:00
2026-06-15 15:03:41 +09:00