lm-deluge 0.0.33__tar.gz → 0.0.34__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.
- {lm_deluge-0.0.33/src/lm_deluge.egg-info → lm_deluge-0.0.34}/PKG-INFO +1 -1
- {lm_deluge-0.0.33 → lm_deluge-0.0.34}/pyproject.toml +1 -1
- {lm_deluge-0.0.33 → lm_deluge-0.0.34}/src/lm_deluge/api_requests/gemini.py +4 -3
- {lm_deluge-0.0.33 → lm_deluge-0.0.34}/src/lm_deluge/client.py +50 -6
- {lm_deluge-0.0.33 → lm_deluge-0.0.34}/src/lm_deluge/models.py +2 -2
- {lm_deluge-0.0.33 → lm_deluge-0.0.34/src/lm_deluge.egg-info}/PKG-INFO +1 -1
- {lm_deluge-0.0.33 → lm_deluge-0.0.34}/LICENSE +0 -0
- {lm_deluge-0.0.33 → lm_deluge-0.0.34}/README.md +0 -0
- {lm_deluge-0.0.33 → lm_deluge-0.0.34}/setup.cfg +0 -0
- {lm_deluge-0.0.33 → lm_deluge-0.0.34}/src/lm_deluge/__init__.py +0 -0
- {lm_deluge-0.0.33 → lm_deluge-0.0.34}/src/lm_deluge/agent.py +0 -0
- {lm_deluge-0.0.33 → lm_deluge-0.0.34}/src/lm_deluge/api_requests/__init__.py +0 -0
- {lm_deluge-0.0.33 → lm_deluge-0.0.34}/src/lm_deluge/api_requests/anthropic.py +0 -0
- {lm_deluge-0.0.33 → lm_deluge-0.0.34}/src/lm_deluge/api_requests/base.py +0 -0
- {lm_deluge-0.0.33 → lm_deluge-0.0.34}/src/lm_deluge/api_requests/bedrock.py +0 -0
- {lm_deluge-0.0.33 → lm_deluge-0.0.34}/src/lm_deluge/api_requests/common.py +0 -0
- {lm_deluge-0.0.33 → lm_deluge-0.0.34}/src/lm_deluge/api_requests/deprecated/bedrock.py +0 -0
- {lm_deluge-0.0.33 → lm_deluge-0.0.34}/src/lm_deluge/api_requests/deprecated/cohere.py +0 -0
- {lm_deluge-0.0.33 → lm_deluge-0.0.34}/src/lm_deluge/api_requests/deprecated/deepseek.py +0 -0
- {lm_deluge-0.0.33 → lm_deluge-0.0.34}/src/lm_deluge/api_requests/deprecated/mistral.py +0 -0
- {lm_deluge-0.0.33 → lm_deluge-0.0.34}/src/lm_deluge/api_requests/deprecated/vertex.py +0 -0
- {lm_deluge-0.0.33 → lm_deluge-0.0.34}/src/lm_deluge/api_requests/mistral.py +0 -0
- {lm_deluge-0.0.33 → lm_deluge-0.0.34}/src/lm_deluge/api_requests/openai.py +0 -0
- {lm_deluge-0.0.33 → lm_deluge-0.0.34}/src/lm_deluge/api_requests/response.py +0 -0
- {lm_deluge-0.0.33 → lm_deluge-0.0.34}/src/lm_deluge/batches.py +0 -0
- {lm_deluge-0.0.33 → lm_deluge-0.0.34}/src/lm_deluge/built_in_tools/anthropic/__init__.py +0 -0
- {lm_deluge-0.0.33 → lm_deluge-0.0.34}/src/lm_deluge/built_in_tools/anthropic/bash.py +0 -0
- {lm_deluge-0.0.33 → lm_deluge-0.0.34}/src/lm_deluge/built_in_tools/anthropic/computer_use.py +0 -0
- {lm_deluge-0.0.33 → lm_deluge-0.0.34}/src/lm_deluge/built_in_tools/anthropic/editor.py +0 -0
- {lm_deluge-0.0.33 → lm_deluge-0.0.34}/src/lm_deluge/built_in_tools/base.py +0 -0
- {lm_deluge-0.0.33 → lm_deluge-0.0.34}/src/lm_deluge/built_in_tools/openai.py +0 -0
- {lm_deluge-0.0.33 → lm_deluge-0.0.34}/src/lm_deluge/cache.py +0 -0
- {lm_deluge-0.0.33 → lm_deluge-0.0.34}/src/lm_deluge/config.py +0 -0
- {lm_deluge-0.0.33 → lm_deluge-0.0.34}/src/lm_deluge/embed.py +0 -0
- {lm_deluge-0.0.33 → lm_deluge-0.0.34}/src/lm_deluge/errors.py +0 -0
- {lm_deluge-0.0.33 → lm_deluge-0.0.34}/src/lm_deluge/file.py +0 -0
- {lm_deluge-0.0.33 → lm_deluge-0.0.34}/src/lm_deluge/gemini_limits.py +0 -0
- {lm_deluge-0.0.33 → lm_deluge-0.0.34}/src/lm_deluge/image.py +0 -0
- {lm_deluge-0.0.33 → lm_deluge-0.0.34}/src/lm_deluge/llm_tools/__init__.py +0 -0
- {lm_deluge-0.0.33 → lm_deluge-0.0.34}/src/lm_deluge/llm_tools/classify.py +0 -0
- {lm_deluge-0.0.33 → lm_deluge-0.0.34}/src/lm_deluge/llm_tools/extract.py +0 -0
- {lm_deluge-0.0.33 → lm_deluge-0.0.34}/src/lm_deluge/llm_tools/locate.py +0 -0
- {lm_deluge-0.0.33 → lm_deluge-0.0.34}/src/lm_deluge/llm_tools/ocr.py +0 -0
- {lm_deluge-0.0.33 → lm_deluge-0.0.34}/src/lm_deluge/llm_tools/score.py +0 -0
- {lm_deluge-0.0.33 → lm_deluge-0.0.34}/src/lm_deluge/llm_tools/translate.py +0 -0
- {lm_deluge-0.0.33 → lm_deluge-0.0.34}/src/lm_deluge/prompt.py +0 -0
- {lm_deluge-0.0.33 → lm_deluge-0.0.34}/src/lm_deluge/request_context.py +0 -0
- {lm_deluge-0.0.33 → lm_deluge-0.0.34}/src/lm_deluge/rerank.py +0 -0
- {lm_deluge-0.0.33 → lm_deluge-0.0.34}/src/lm_deluge/tool.py +0 -0
- {lm_deluge-0.0.33 → lm_deluge-0.0.34}/src/lm_deluge/tracker.py +0 -0
- {lm_deluge-0.0.33 → lm_deluge-0.0.34}/src/lm_deluge/usage.py +0 -0
- {lm_deluge-0.0.33 → lm_deluge-0.0.34}/src/lm_deluge/util/json.py +0 -0
- {lm_deluge-0.0.33 → lm_deluge-0.0.34}/src/lm_deluge/util/logprobs.py +0 -0
- {lm_deluge-0.0.33 → lm_deluge-0.0.34}/src/lm_deluge/util/spatial.py +0 -0
- {lm_deluge-0.0.33 → lm_deluge-0.0.34}/src/lm_deluge/util/validation.py +0 -0
- {lm_deluge-0.0.33 → lm_deluge-0.0.34}/src/lm_deluge/util/xml.py +0 -0
- {lm_deluge-0.0.33 → lm_deluge-0.0.34}/src/lm_deluge.egg-info/SOURCES.txt +0 -0
- {lm_deluge-0.0.33 → lm_deluge-0.0.34}/src/lm_deluge.egg-info/dependency_links.txt +0 -0
- {lm_deluge-0.0.33 → lm_deluge-0.0.34}/src/lm_deluge.egg-info/requires.txt +0 -0
- {lm_deluge-0.0.33 → lm_deluge-0.0.34}/src/lm_deluge.egg-info/top_level.txt +0 -0
- {lm_deluge-0.0.33 → lm_deluge-0.0.34}/tests/test_builtin_tools.py +0 -0
- {lm_deluge-0.0.33 → lm_deluge-0.0.34}/tests/test_native_mcp_server.py +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import json
|
|
2
2
|
import os
|
|
3
3
|
import warnings
|
|
4
|
-
|
|
4
|
+
from typing import Any
|
|
5
5
|
from aiohttp import ClientResponse
|
|
6
6
|
|
|
7
7
|
from lm_deluge.request_context import RequestContext
|
|
@@ -37,11 +37,12 @@ async def _build_gemini_request(
|
|
|
37
37
|
|
|
38
38
|
# Handle reasoning models (thinking)
|
|
39
39
|
if model.reasoning_model:
|
|
40
|
-
thinking_config = None
|
|
40
|
+
thinking_config: dict[str, Any] | None = None
|
|
41
41
|
effort = sampling_params.reasoning_effort
|
|
42
42
|
if effort is None or effort == "none":
|
|
43
|
+
budget = 128 if "2.5-pro" in model.id else 0
|
|
43
44
|
# Explicitly disable thoughts when no effort is requested
|
|
44
|
-
thinking_config = {"includeThoughts": False, "thinkingBudget":
|
|
45
|
+
thinking_config = {"includeThoughts": False, "thinkingBudget": budget}
|
|
45
46
|
else:
|
|
46
47
|
thinking_config = {"includeThoughts": True}
|
|
47
48
|
if effort in {"low", "medium", "high"} and "flash" in model.id:
|
|
@@ -773,10 +773,54 @@ class _LLMClient(BaseModel):
|
|
|
773
773
|
|
|
774
774
|
# Clean factory function with perfect IDE support
|
|
775
775
|
@overload
|
|
776
|
-
def LLMClient(
|
|
776
|
+
def LLMClient(
|
|
777
|
+
model_names: str,
|
|
778
|
+
*,
|
|
779
|
+
max_requests_per_minute: int = 1_000,
|
|
780
|
+
max_tokens_per_minute: int = 100_000,
|
|
781
|
+
max_concurrent_requests: int = 225,
|
|
782
|
+
sampling_params: list[SamplingParams] | None = None,
|
|
783
|
+
model_weights: list[float] | Literal["uniform", "dynamic"] = "uniform",
|
|
784
|
+
max_attempts: int = 5,
|
|
785
|
+
request_timeout: int = 30,
|
|
786
|
+
cache: Any = None,
|
|
787
|
+
extra_headers: dict[str, str] | None = None,
|
|
788
|
+
temperature: float = 0.75,
|
|
789
|
+
top_p: float = 1.0,
|
|
790
|
+
json_mode: bool = False,
|
|
791
|
+
max_new_tokens: int = 512,
|
|
792
|
+
reasoning_effort: Literal["low", "medium", "high", None] = None,
|
|
793
|
+
logprobs: bool = False,
|
|
794
|
+
top_logprobs: int | None = None,
|
|
795
|
+
force_local_mcp: bool = False,
|
|
796
|
+
progress: Literal["rich", "tqdm", "manual"] = "rich",
|
|
797
|
+
) -> _LLMClient: ...
|
|
798
|
+
|
|
799
|
+
|
|
800
|
+
@overload
|
|
801
|
+
def LLMClient(
|
|
802
|
+
model_names: list[str],
|
|
803
|
+
*,
|
|
804
|
+
max_requests_per_minute: int = 1_000,
|
|
805
|
+
max_tokens_per_minute: int = 100_000,
|
|
806
|
+
max_concurrent_requests: int = 225,
|
|
807
|
+
sampling_params: list[SamplingParams] | None = None,
|
|
808
|
+
model_weights: list[float] | Literal["uniform", "dynamic"] = "uniform",
|
|
809
|
+
max_attempts: int = 5,
|
|
810
|
+
request_timeout: int = 30,
|
|
811
|
+
cache: Any = None,
|
|
812
|
+
extra_headers: dict[str, str] | None = None,
|
|
813
|
+
temperature: float = 0.75,
|
|
814
|
+
top_p: float = 1.0,
|
|
815
|
+
json_mode: bool = False,
|
|
816
|
+
max_new_tokens: int = 512,
|
|
817
|
+
reasoning_effort: Literal["low", "medium", "high", None] = None,
|
|
818
|
+
logprobs: bool = False,
|
|
819
|
+
top_logprobs: int | None = None,
|
|
820
|
+
force_local_mcp: bool = False,
|
|
821
|
+
progress: Literal["rich", "tqdm", "manual"] = "rich",
|
|
822
|
+
) -> _LLMClient: ...
|
|
777
823
|
|
|
778
|
-
@overload
|
|
779
|
-
def LLMClient(model_names: list[str], **kwargs) -> _LLMClient: ...
|
|
780
824
|
|
|
781
825
|
def LLMClient(
|
|
782
826
|
model_names: str | list[str] = "gpt-4.1-mini",
|
|
@@ -802,18 +846,18 @@ def LLMClient(
|
|
|
802
846
|
) -> _LLMClient:
|
|
803
847
|
"""
|
|
804
848
|
Create an LLMClient with model_names as a positional argument.
|
|
805
|
-
|
|
849
|
+
|
|
806
850
|
Args:
|
|
807
851
|
model_names: Model name(s) to use - can be a single string or list of strings
|
|
808
852
|
**kwargs: All other LLMClient configuration options (keyword-only)
|
|
809
|
-
|
|
853
|
+
|
|
810
854
|
Returns:
|
|
811
855
|
Configured LLMClient instance
|
|
812
856
|
"""
|
|
813
857
|
# Handle default for mutable argument
|
|
814
858
|
if sampling_params is None:
|
|
815
859
|
sampling_params = []
|
|
816
|
-
|
|
860
|
+
|
|
817
861
|
# Simply pass everything to the Pydantic constructor
|
|
818
862
|
return _LLMClient(
|
|
819
863
|
model_names=model_names,
|
|
@@ -1275,7 +1275,7 @@ def register_model(
|
|
|
1275
1275
|
reasoning_model: bool = False,
|
|
1276
1276
|
regions: list[str] | dict[str, int] = field(default_factory=list),
|
|
1277
1277
|
tokens_per_minute: int | None = None,
|
|
1278
|
-
requests_per_minute: int | None = None
|
|
1278
|
+
requests_per_minute: int | None = None,
|
|
1279
1279
|
) -> APIModel:
|
|
1280
1280
|
"""Register a model configuration and return the created APIModel."""
|
|
1281
1281
|
model = APIModel(
|
|
@@ -1292,7 +1292,7 @@ def register_model(
|
|
|
1292
1292
|
reasoning_model=reasoning_model,
|
|
1293
1293
|
regions=regions,
|
|
1294
1294
|
tokens_per_minute=tokens_per_minute,
|
|
1295
|
-
requests_per_minute=requests_per_minute
|
|
1295
|
+
requests_per_minute=requests_per_minute,
|
|
1296
1296
|
)
|
|
1297
1297
|
registry[model.id] = model
|
|
1298
1298
|
return model
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{lm_deluge-0.0.33 → lm_deluge-0.0.34}/src/lm_deluge/built_in_tools/anthropic/computer_use.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|