Skip to content

Commit 2b689f9

Browse files
feat(web): add per-model temperature configuration
Adds an optional `temperature` field to all language model provider schemas, allowing temperature to be configured per model instead of globally via environment variable. The per-model setting takes precedence, with the env var as a fallback. Also deprecates SOURCEBOT_CHAT_MODEL_TEMPERATURE (now defaults to undefined instead of 0.3) in favor of the per-model config. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 59b5971 commit 2b689f9

File tree

12 files changed

+544
-4
lines changed

12 files changed

+544
-4
lines changed

docs/snippets/schemas/v3/index.schema.mdx

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1813,6 +1813,10 @@
18131813
"pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$",
18141814
"description": "Optional base URL."
18151815
},
1816+
"temperature": {
1817+
"type": "number",
1818+
"description": "Optional temperature setting to use with the model."
1819+
},
18161820
"headers": {
18171821
"type": "object",
18181822
"description": "Optional headers to use with the model.",
@@ -1947,6 +1951,10 @@
19471951
"pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$",
19481952
"description": "Optional base URL."
19491953
},
1954+
"temperature": {
1955+
"type": "number",
1956+
"description": "Optional temperature setting to use with the model."
1957+
},
19501958
"headers": {
19511959
"type": "object",
19521960
"description": "Optional headers to use with the model.",
@@ -2078,6 +2086,10 @@
20782086
"detailed"
20792087
]
20802088
},
2089+
"temperature": {
2090+
"type": "number",
2091+
"description": "Optional temperature setting to use with the model."
2092+
},
20812093
"headers": {
20822094
"type": "object",
20832095
"description": "Optional headers to use with the model.",
@@ -2181,6 +2193,10 @@
21812193
"pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$",
21822194
"description": "Optional base URL."
21832195
},
2196+
"temperature": {
2197+
"type": "number",
2198+
"description": "Optional temperature setting to use with the model."
2199+
},
21842200
"headers": {
21852201
"type": "object",
21862202
"description": "Optional headers to use with the model.",
@@ -2284,6 +2300,10 @@
22842300
"pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$",
22852301
"description": "Optional base URL."
22862302
},
2303+
"temperature": {
2304+
"type": "number",
2305+
"description": "Optional temperature setting to use with the model."
2306+
},
22872307
"headers": {
22882308
"type": "object",
22892309
"description": "Optional headers to use with the model.",
@@ -2403,6 +2423,10 @@
24032423
"pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$",
24042424
"description": "Optional base URL."
24052425
},
2426+
"temperature": {
2427+
"type": "number",
2428+
"description": "Optional temperature setting to use with the model."
2429+
},
24062430
"headers": {
24072431
"type": "object",
24082432
"description": "Optional headers to use with the model.",
@@ -2524,6 +2548,10 @@
25242548
"pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$",
25252549
"description": "Optional base URL."
25262550
},
2551+
"temperature": {
2552+
"type": "number",
2553+
"description": "Optional temperature setting to use with the model."
2554+
},
25272555
"headers": {
25282556
"type": "object",
25292557
"description": "Optional headers to use with the model.",
@@ -2627,6 +2655,10 @@
26272655
"pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$",
26282656
"description": "Optional base URL."
26292657
},
2658+
"temperature": {
2659+
"type": "number",
2660+
"description": "Optional temperature setting to use with the model."
2661+
},
26302662
"headers": {
26312663
"type": "object",
26322664
"description": "Optional headers to use with the model.",
@@ -2756,6 +2788,10 @@
27562788
"detailed"
27572789
]
27582790
},
2791+
"temperature": {
2792+
"type": "number",
2793+
"description": "Optional temperature setting to use with the model."
2794+
},
27592795
"headers": {
27602796
"type": "object",
27612797
"description": "Optional headers to use with the model.",
@@ -2959,6 +2995,10 @@
29592995
"thinking",
29602996
"reasoning"
29612997
]
2998+
},
2999+
"temperature": {
3000+
"type": "number",
3001+
"description": "Optional temperature setting to use with the model."
29623002
}
29633003
},
29643004
"required": [
@@ -3020,6 +3060,10 @@
30203060
"pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$",
30213061
"description": "Optional base URL."
30223062
},
3063+
"temperature": {
3064+
"type": "number",
3065+
"description": "Optional temperature setting to use with the model."
3066+
},
30233067
"headers": {
30243068
"type": "object",
30253069
"description": "Optional headers to use with the model.",
@@ -3127,6 +3171,10 @@
31273171
"pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$",
31283172
"description": "Optional base URL."
31293173
},
3174+
"temperature": {
3175+
"type": "number",
3176+
"description": "Optional temperature setting to use with the model."
3177+
},
31303178
"headers": {
31313179
"type": "object",
31323180
"description": "Optional headers to use with the model.",
@@ -3303,6 +3351,10 @@
33033351
"pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$",
33043352
"description": "Optional base URL."
33053353
},
3354+
"temperature": {
3355+
"type": "number",
3356+
"description": "Optional temperature setting to use with the model."
3357+
},
33063358
"headers": {
33073359
"type": "object",
33083360
"description": "Optional headers to use with the model.",
@@ -3437,6 +3489,10 @@
34373489
"pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$",
34383490
"description": "Optional base URL."
34393491
},
3492+
"temperature": {
3493+
"type": "number",
3494+
"description": "Optional temperature setting to use with the model."
3495+
},
34403496
"headers": {
34413497
"type": "object",
34423498
"description": "Optional headers to use with the model.",
@@ -3568,6 +3624,10 @@
35683624
"detailed"
35693625
]
35703626
},
3627+
"temperature": {
3628+
"type": "number",
3629+
"description": "Optional temperature setting to use with the model."
3630+
},
35713631
"headers": {
35723632
"type": "object",
35733633
"description": "Optional headers to use with the model.",
@@ -3671,6 +3731,10 @@
36713731
"pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$",
36723732
"description": "Optional base URL."
36733733
},
3734+
"temperature": {
3735+
"type": "number",
3736+
"description": "Optional temperature setting to use with the model."
3737+
},
36743738
"headers": {
36753739
"type": "object",
36763740
"description": "Optional headers to use with the model.",
@@ -3774,6 +3838,10 @@
37743838
"pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$",
37753839
"description": "Optional base URL."
37763840
},
3841+
"temperature": {
3842+
"type": "number",
3843+
"description": "Optional temperature setting to use with the model."
3844+
},
37773845
"headers": {
37783846
"type": "object",
37793847
"description": "Optional headers to use with the model.",
@@ -3893,6 +3961,10 @@
38933961
"pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$",
38943962
"description": "Optional base URL."
38953963
},
3964+
"temperature": {
3965+
"type": "number",
3966+
"description": "Optional temperature setting to use with the model."
3967+
},
38963968
"headers": {
38973969
"type": "object",
38983970
"description": "Optional headers to use with the model.",
@@ -4014,6 +4086,10 @@
40144086
"pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$",
40154087
"description": "Optional base URL."
40164088
},
4089+
"temperature": {
4090+
"type": "number",
4091+
"description": "Optional temperature setting to use with the model."
4092+
},
40174093
"headers": {
40184094
"type": "object",
40194095
"description": "Optional headers to use with the model.",
@@ -4117,6 +4193,10 @@
41174193
"pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$",
41184194
"description": "Optional base URL."
41194195
},
4196+
"temperature": {
4197+
"type": "number",
4198+
"description": "Optional temperature setting to use with the model."
4199+
},
41204200
"headers": {
41214201
"type": "object",
41224202
"description": "Optional headers to use with the model.",
@@ -4246,6 +4326,10 @@
42464326
"detailed"
42474327
]
42484328
},
4329+
"temperature": {
4330+
"type": "number",
4331+
"description": "Optional temperature setting to use with the model."
4332+
},
42494333
"headers": {
42504334
"type": "object",
42514335
"description": "Optional headers to use with the model.",
@@ -4449,6 +4533,10 @@
44494533
"thinking",
44504534
"reasoning"
44514535
]
4536+
},
4537+
"temperature": {
4538+
"type": "number",
4539+
"description": "Optional temperature setting to use with the model."
44524540
}
44534541
},
44544542
"required": [
@@ -4510,6 +4598,10 @@
45104598
"pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$",
45114599
"description": "Optional base URL."
45124600
},
4601+
"temperature": {
4602+
"type": "number",
4603+
"description": "Optional temperature setting to use with the model."
4604+
},
45134605
"headers": {
45144606
"type": "object",
45154607
"description": "Optional headers to use with the model.",
@@ -4617,6 +4709,10 @@
46174709
"pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$",
46184710
"description": "Optional base URL."
46194711
},
4712+
"temperature": {
4713+
"type": "number",
4714+
"description": "Optional temperature setting to use with the model."
4715+
},
46204716
"headers": {
46214717
"type": "object",
46224718
"description": "Optional headers to use with the model.",

0 commit comments

Comments
 (0)