lm-deluge 0.0.26__tar.gz → 0.0.28__tar.gz

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.

Files changed (62) hide show
  1. {lm_deluge-0.0.26/src/lm_deluge.egg-info → lm_deluge-0.0.28}/PKG-INFO +2 -2
  2. {lm_deluge-0.0.26 → lm_deluge-0.0.28}/README.md +1 -1
  3. {lm_deluge-0.0.26 → lm_deluge-0.0.28}/pyproject.toml +1 -1
  4. {lm_deluge-0.0.26 → lm_deluge-0.0.28}/src/lm_deluge/api_requests/gemini.py +11 -8
  5. {lm_deluge-0.0.26 → lm_deluge-0.0.28}/src/lm_deluge/api_requests/openai.py +8 -1
  6. {lm_deluge-0.0.26 → lm_deluge-0.0.28/src/lm_deluge.egg-info}/PKG-INFO +2 -2
  7. {lm_deluge-0.0.26 → lm_deluge-0.0.28}/LICENSE +0 -0
  8. {lm_deluge-0.0.26 → lm_deluge-0.0.28}/setup.cfg +0 -0
  9. {lm_deluge-0.0.26 → lm_deluge-0.0.28}/src/lm_deluge/__init__.py +0 -0
  10. {lm_deluge-0.0.26 → lm_deluge-0.0.28}/src/lm_deluge/agent.py +0 -0
  11. {lm_deluge-0.0.26 → lm_deluge-0.0.28}/src/lm_deluge/api_requests/__init__.py +0 -0
  12. {lm_deluge-0.0.26 → lm_deluge-0.0.28}/src/lm_deluge/api_requests/anthropic.py +0 -0
  13. {lm_deluge-0.0.26 → lm_deluge-0.0.28}/src/lm_deluge/api_requests/base.py +0 -0
  14. {lm_deluge-0.0.26 → lm_deluge-0.0.28}/src/lm_deluge/api_requests/bedrock.py +0 -0
  15. {lm_deluge-0.0.26 → lm_deluge-0.0.28}/src/lm_deluge/api_requests/common.py +0 -0
  16. {lm_deluge-0.0.26 → lm_deluge-0.0.28}/src/lm_deluge/api_requests/deprecated/bedrock.py +0 -0
  17. {lm_deluge-0.0.26 → lm_deluge-0.0.28}/src/lm_deluge/api_requests/deprecated/cohere.py +0 -0
  18. {lm_deluge-0.0.26 → lm_deluge-0.0.28}/src/lm_deluge/api_requests/deprecated/deepseek.py +0 -0
  19. {lm_deluge-0.0.26 → lm_deluge-0.0.28}/src/lm_deluge/api_requests/deprecated/mistral.py +0 -0
  20. {lm_deluge-0.0.26 → lm_deluge-0.0.28}/src/lm_deluge/api_requests/deprecated/vertex.py +0 -0
  21. {lm_deluge-0.0.26 → lm_deluge-0.0.28}/src/lm_deluge/api_requests/mistral.py +0 -0
  22. {lm_deluge-0.0.26 → lm_deluge-0.0.28}/src/lm_deluge/api_requests/response.py +0 -0
  23. {lm_deluge-0.0.26 → lm_deluge-0.0.28}/src/lm_deluge/batches.py +0 -0
  24. {lm_deluge-0.0.26 → lm_deluge-0.0.28}/src/lm_deluge/built_in_tools/anthropic/__init__.py +0 -0
  25. {lm_deluge-0.0.26 → lm_deluge-0.0.28}/src/lm_deluge/built_in_tools/anthropic/bash.py +0 -0
  26. {lm_deluge-0.0.26 → lm_deluge-0.0.28}/src/lm_deluge/built_in_tools/anthropic/computer_use.py +0 -0
  27. {lm_deluge-0.0.26 → lm_deluge-0.0.28}/src/lm_deluge/built_in_tools/anthropic/editor.py +0 -0
  28. {lm_deluge-0.0.26 → lm_deluge-0.0.28}/src/lm_deluge/built_in_tools/base.py +0 -0
  29. {lm_deluge-0.0.26 → lm_deluge-0.0.28}/src/lm_deluge/built_in_tools/openai.py +0 -0
  30. {lm_deluge-0.0.26 → lm_deluge-0.0.28}/src/lm_deluge/cache.py +0 -0
  31. {lm_deluge-0.0.26 → lm_deluge-0.0.28}/src/lm_deluge/client.py +0 -0
  32. {lm_deluge-0.0.26 → lm_deluge-0.0.28}/src/lm_deluge/config.py +0 -0
  33. {lm_deluge-0.0.26 → lm_deluge-0.0.28}/src/lm_deluge/embed.py +0 -0
  34. {lm_deluge-0.0.26 → lm_deluge-0.0.28}/src/lm_deluge/errors.py +0 -0
  35. {lm_deluge-0.0.26 → lm_deluge-0.0.28}/src/lm_deluge/file.py +0 -0
  36. {lm_deluge-0.0.26 → lm_deluge-0.0.28}/src/lm_deluge/gemini_limits.py +0 -0
  37. {lm_deluge-0.0.26 → lm_deluge-0.0.28}/src/lm_deluge/image.py +0 -0
  38. {lm_deluge-0.0.26 → lm_deluge-0.0.28}/src/lm_deluge/llm_tools/__init__.py +0 -0
  39. {lm_deluge-0.0.26 → lm_deluge-0.0.28}/src/lm_deluge/llm_tools/classify.py +0 -0
  40. {lm_deluge-0.0.26 → lm_deluge-0.0.28}/src/lm_deluge/llm_tools/extract.py +0 -0
  41. {lm_deluge-0.0.26 → lm_deluge-0.0.28}/src/lm_deluge/llm_tools/locate.py +0 -0
  42. {lm_deluge-0.0.26 → lm_deluge-0.0.28}/src/lm_deluge/llm_tools/ocr.py +0 -0
  43. {lm_deluge-0.0.26 → lm_deluge-0.0.28}/src/lm_deluge/llm_tools/score.py +0 -0
  44. {lm_deluge-0.0.26 → lm_deluge-0.0.28}/src/lm_deluge/llm_tools/translate.py +0 -0
  45. {lm_deluge-0.0.26 → lm_deluge-0.0.28}/src/lm_deluge/models.py +0 -0
  46. {lm_deluge-0.0.26 → lm_deluge-0.0.28}/src/lm_deluge/prompt.py +0 -0
  47. {lm_deluge-0.0.26 → lm_deluge-0.0.28}/src/lm_deluge/request_context.py +0 -0
  48. {lm_deluge-0.0.26 → lm_deluge-0.0.28}/src/lm_deluge/rerank.py +0 -0
  49. {lm_deluge-0.0.26 → lm_deluge-0.0.28}/src/lm_deluge/tool.py +0 -0
  50. {lm_deluge-0.0.26 → lm_deluge-0.0.28}/src/lm_deluge/tracker.py +0 -0
  51. {lm_deluge-0.0.26 → lm_deluge-0.0.28}/src/lm_deluge/usage.py +0 -0
  52. {lm_deluge-0.0.26 → lm_deluge-0.0.28}/src/lm_deluge/util/json.py +0 -0
  53. {lm_deluge-0.0.26 → lm_deluge-0.0.28}/src/lm_deluge/util/logprobs.py +0 -0
  54. {lm_deluge-0.0.26 → lm_deluge-0.0.28}/src/lm_deluge/util/spatial.py +0 -0
  55. {lm_deluge-0.0.26 → lm_deluge-0.0.28}/src/lm_deluge/util/validation.py +0 -0
  56. {lm_deluge-0.0.26 → lm_deluge-0.0.28}/src/lm_deluge/util/xml.py +0 -0
  57. {lm_deluge-0.0.26 → lm_deluge-0.0.28}/src/lm_deluge.egg-info/SOURCES.txt +0 -0
  58. {lm_deluge-0.0.26 → lm_deluge-0.0.28}/src/lm_deluge.egg-info/dependency_links.txt +0 -0
  59. {lm_deluge-0.0.26 → lm_deluge-0.0.28}/src/lm_deluge.egg-info/requires.txt +0 -0
  60. {lm_deluge-0.0.26 → lm_deluge-0.0.28}/src/lm_deluge.egg-info/top_level.txt +0 -0
  61. {lm_deluge-0.0.26 → lm_deluge-0.0.28}/tests/test_builtin_tools.py +0 -0
  62. {lm_deluge-0.0.26 → lm_deluge-0.0.28}/tests/test_native_mcp_server.py +0 -0
@@ -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
 
@@ -247,7 +247,7 @@ We support all models in `src/lm_deluge/models.py`. Vertex support is not planne
247
247
 
248
248
  ## Feature Support
249
249
 
250
- 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.
250
+ 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.
251
251
 
252
252
  ## Built‑in tools
253
253
 
@@ -3,7 +3,7 @@ requires = ["setuptools", "wheel"]
3
3
 
4
4
  [project]
5
5
  name = "lm_deluge"
6
- version = "0.0.26"
6
+ version = "0.0.28"
7
7
  authors = [{ name = "Benjamin Anderson", email = "ben@trytaylor.ai" }]
8
8
  description = "Python utility for using LLM API models."
9
9
  readme = "README.md"
@@ -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
 
File without changes
File without changes