lm-deluge 0.0.26__py3-none-any.whl → 0.0.28__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of lm-deluge might be problematic. Click here for more details.

@@ -37,14 +37,17 @@ async def _build_gemini_request(
37
37
 
38
38
  # Handle reasoning models (thinking)
39
39
  if model.reasoning_model:
40
- request_json["generationConfig"]["thinkingConfig"] = {"includeThoughts": True}
41
- if sampling_params.reasoning_effort and "flash" in model.id:
42
- budget = {"low": 1024, "medium": 4096, "high": 16384}.get(
43
- sampling_params.reasoning_effort
44
- )
45
- request_json["generationConfig"]["thinkingConfig"]["thinkingBudget"] = (
46
- budget
47
- )
40
+ thinking_config = None
41
+ effort = sampling_params.reasoning_effort
42
+ if effort is None or effort == "none":
43
+ # Explicitly disable thoughts when no effort is requested
44
+ thinking_config = {"includeThoughts": False, "thinkingBudget": 0}
45
+ else:
46
+ thinking_config = {"includeThoughts": True}
47
+ if effort in {"low", "medium", "high"} and "flash" in model.id:
48
+ budget = {"low": 1024, "medium": 4096, "high": 16384}[effort]
49
+ thinking_config["thinkingBudget"] = budget
50
+ request_json["generationConfig"]["thinkingConfig"] = thinking_config
48
51
 
49
52
  else:
50
53
  if sampling_params.reasoning_effort:
@@ -37,7 +37,14 @@ async def _build_oa_chat_request(
37
37
  if model.reasoning_model:
38
38
  request_json["temperature"] = 1.0
39
39
  request_json["top_p"] = 1.0
40
- request_json["reasoning_effort"] = sampling_params.reasoning_effort
40
+ effort = sampling_params.reasoning_effort
41
+ if effort in [None, "none"]:
42
+ # Disable reasoning for Gemini models when no effort requested
43
+ if "gemini" in model.id:
44
+ effort = "none"
45
+ else:
46
+ effort = "low"
47
+ request_json["reasoning_effort"] = effort
41
48
  else:
42
49
  if sampling_params.reasoning_effort:
43
50
  warnings.warn(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lm_deluge
3
- Version: 0.0.26
3
+ Version: 0.0.28
4
4
  Summary: Python utility for using LLM API models.
5
5
  Author-email: Benjamin Anderson <ben@trytaylor.ai>
6
6
  Requires-Python: >=3.10
@@ -274,7 +274,7 @@ We support all models in `src/lm_deluge/models.py`. Vertex support is not planne
274
274
 
275
275
  ## Feature Support
276
276
 
277
- We support structured outputs via `json_mode` parameter provided to `SamplingParams`. Structured outputs with a schema are planned. Reasoning models are supported via the `reasoning_effort` parameter, which is translated to a thinking budget for Claude/Gemini. Image models are supported. We support tool use as documented above. We support logprobs for OpenAI models that return them.
277
+ We support structured outputs via `json_mode` parameter provided to `SamplingParams`. Structured outputs with a schema are planned. Reasoning models are supported via the `reasoning_effort` parameter, which is translated to a thinking budget for Claude/Gemini. Passing `None` (or the string `"none"`) disables Gemini thoughts entirely. Image models are supported. We support tool use as documented above. We support logprobs for OpenAI models that return them.
278
278
 
279
279
  ## Built‑in tools
280
280
 
@@ -21,9 +21,9 @@ lm_deluge/api_requests/anthropic.py,sha256=Vi2iGQw6LGPW8d4X489Jg-dlEye529jf8i5Ys
21
21
  lm_deluge/api_requests/base.py,sha256=EVHNFtlttKbN7Tt1MnLaO-NjvKHPSV5CqlRv-OnpVAE,5593
22
22
  lm_deluge/api_requests/bedrock.py,sha256=p6leW5stnvb406lwbmVFmfTGxdEI-t0GfaTExpol3qk,10900
23
23
  lm_deluge/api_requests/common.py,sha256=BZ3vRO5TB669_UsNKugkkuFSzoLHOYJIKt4nV4sf4vc,422
24
- lm_deluge/api_requests/gemini.py,sha256=UeA4gsIePsIu6IQQ7izR359LLQQTi0Qky_ykjH1XQf4,7461
24
+ lm_deluge/api_requests/gemini.py,sha256=W4NjQ0buBsdS7RYpzDahrXNQWMzDHRMLNRSphCOmIqg,7685
25
25
  lm_deluge/api_requests/mistral.py,sha256=S_LpOfCGbCVEROH_od3P-tYeNYTKFMamMTL-c_wFCBI,4597
26
- lm_deluge/api_requests/openai.py,sha256=jb_pBGqSbqs7SvbA45Odu3JkwS3jsKn-p3hG8-qkYbc,21509
26
+ lm_deluge/api_requests/openai.py,sha256=hsJIMRO4wpalrczD0bVc--RWFu2BoXEp0USAwRlLQEA,21763
27
27
  lm_deluge/api_requests/response.py,sha256=FtkVYk_rDH93Kj9pqbB-l7a4dQHzVr6ivKL9khYKLbs,5966
28
28
  lm_deluge/api_requests/deprecated/bedrock.py,sha256=WrcIShCoO8JCUSlFOCHxg6KQCNTZfw3TpYTvSpYk4mA,11320
29
29
  lm_deluge/api_requests/deprecated/cohere.py,sha256=KgDScD6_bWhAzOY5BHZQKSA3kurt4KGENqC4wLsGmcU,5142
@@ -48,8 +48,8 @@ lm_deluge/util/logprobs.py,sha256=UkBZakOxWluaLqHrjARu7xnJ0uCHVfLGHJdnYlEcutk,11
48
48
  lm_deluge/util/spatial.py,sha256=BsF_UKhE-x0xBirc-bV1xSKZRTUhsOBdGqsMKme20C8,4099
49
49
  lm_deluge/util/validation.py,sha256=hz5dDb3ebvZrZhnaWxOxbNSVMI6nmaOODBkk0htAUhs,1575
50
50
  lm_deluge/util/xml.py,sha256=Ft4zajoYBJR3HHCt2oHwGfymGLdvp_gegVmJ-Wqk4Ck,10547
51
- lm_deluge-0.0.26.dist-info/licenses/LICENSE,sha256=uNNXGXPCw2TC7CUs7SEBkA-Mz6QBQFWUUEWDMgEs1dU,1058
52
- lm_deluge-0.0.26.dist-info/METADATA,sha256=2zzPvIBE0SdA0RAAKGnyUQDIq-sE_Eo34pfRu_ygi4I,12978
53
- lm_deluge-0.0.26.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
54
- lm_deluge-0.0.26.dist-info/top_level.txt,sha256=hqU-TJX93yBwpgkDtYcXyLr3t7TLSCCZ_reytJjwBaE,10
55
- lm_deluge-0.0.26.dist-info/RECORD,,
51
+ lm_deluge-0.0.28.dist-info/licenses/LICENSE,sha256=uNNXGXPCw2TC7CUs7SEBkA-Mz6QBQFWUUEWDMgEs1dU,1058
52
+ lm_deluge-0.0.28.dist-info/METADATA,sha256=1yT_gHlhOwcS8hEC2kFnmxEN6jr9RBozCuaivHvO8vQ,13053
53
+ lm_deluge-0.0.28.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
54
+ lm_deluge-0.0.28.dist-info/top_level.txt,sha256=hqU-TJX93yBwpgkDtYcXyLr3t7TLSCCZ_reytJjwBaE,10
55
+ lm_deluge-0.0.28.dist-info/RECORD,,