lm-deluge 0.0.67__py3-none-any.whl → 0.0.90__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.
- lm_deluge/__init__.py +1 -2
- lm_deluge/api_requests/anthropic.py +117 -22
- lm_deluge/api_requests/base.py +84 -11
- lm_deluge/api_requests/bedrock.py +30 -6
- lm_deluge/api_requests/chat_reasoning.py +4 -0
- lm_deluge/api_requests/gemini.py +166 -20
- lm_deluge/api_requests/openai.py +145 -25
- lm_deluge/batches.py +15 -45
- lm_deluge/client.py +309 -50
- lm_deluge/config.py +15 -3
- lm_deluge/models/__init__.py +14 -1
- lm_deluge/models/anthropic.py +29 -14
- lm_deluge/models/arcee.py +16 -0
- lm_deluge/models/deepseek.py +36 -4
- lm_deluge/models/google.py +42 -0
- lm_deluge/models/grok.py +24 -0
- lm_deluge/models/kimi.py +36 -0
- lm_deluge/models/minimax.py +18 -0
- lm_deluge/models/openai.py +100 -0
- lm_deluge/models/openrouter.py +133 -7
- lm_deluge/models/together.py +11 -0
- lm_deluge/models/zai.py +50 -0
- lm_deluge/pipelines/gepa/__init__.py +95 -0
- lm_deluge/pipelines/gepa/core.py +354 -0
- lm_deluge/pipelines/gepa/docs/samples.py +705 -0
- lm_deluge/pipelines/gepa/examples/01_synthetic_keywords.py +140 -0
- lm_deluge/pipelines/gepa/examples/02_gsm8k_math.py +261 -0
- lm_deluge/pipelines/gepa/examples/03_hotpotqa_multihop.py +300 -0
- lm_deluge/pipelines/gepa/examples/04_batch_classification.py +271 -0
- lm_deluge/pipelines/gepa/examples/simple_qa.py +129 -0
- lm_deluge/pipelines/gepa/optimizer.py +435 -0
- lm_deluge/pipelines/gepa/proposer.py +235 -0
- lm_deluge/pipelines/gepa/util.py +165 -0
- lm_deluge/{llm_tools → pipelines}/score.py +2 -2
- lm_deluge/{llm_tools → pipelines}/translate.py +5 -3
- lm_deluge/prompt.py +537 -88
- lm_deluge/request_context.py +7 -2
- lm_deluge/server/__init__.py +24 -0
- lm_deluge/server/__main__.py +144 -0
- lm_deluge/server/adapters.py +369 -0
- lm_deluge/server/app.py +388 -0
- lm_deluge/server/auth.py +71 -0
- lm_deluge/server/model_policy.py +215 -0
- lm_deluge/server/models_anthropic.py +172 -0
- lm_deluge/server/models_openai.py +175 -0
- lm_deluge/tool/__init__.py +1130 -0
- lm_deluge/tool/builtin/anthropic/__init__.py +300 -0
- lm_deluge/tool/builtin/anthropic/bash.py +0 -0
- lm_deluge/tool/builtin/anthropic/computer_use.py +0 -0
- lm_deluge/tool/builtin/gemini.py +59 -0
- lm_deluge/tool/builtin/openai.py +74 -0
- lm_deluge/tool/cua/__init__.py +173 -0
- lm_deluge/tool/cua/actions.py +148 -0
- lm_deluge/tool/cua/base.py +27 -0
- lm_deluge/tool/cua/batch.py +215 -0
- lm_deluge/tool/cua/converters.py +466 -0
- lm_deluge/tool/cua/kernel.py +702 -0
- lm_deluge/tool/cua/trycua.py +989 -0
- lm_deluge/tool/prefab/__init__.py +45 -0
- lm_deluge/tool/prefab/batch_tool.py +156 -0
- lm_deluge/tool/prefab/docs.py +1119 -0
- lm_deluge/tool/prefab/email.py +294 -0
- lm_deluge/tool/prefab/filesystem.py +1711 -0
- lm_deluge/tool/prefab/full_text_search/__init__.py +285 -0
- lm_deluge/tool/prefab/full_text_search/tantivy_index.py +396 -0
- lm_deluge/tool/prefab/memory.py +458 -0
- lm_deluge/tool/prefab/otc/__init__.py +165 -0
- lm_deluge/tool/prefab/otc/executor.py +281 -0
- lm_deluge/tool/prefab/otc/parse.py +188 -0
- lm_deluge/tool/prefab/random.py +212 -0
- lm_deluge/tool/prefab/rlm/__init__.py +296 -0
- lm_deluge/tool/prefab/rlm/executor.py +349 -0
- lm_deluge/tool/prefab/rlm/parse.py +144 -0
- lm_deluge/tool/prefab/sandbox/__init__.py +19 -0
- lm_deluge/tool/prefab/sandbox/daytona_sandbox.py +483 -0
- lm_deluge/tool/prefab/sandbox/docker_sandbox.py +609 -0
- lm_deluge/tool/prefab/sandbox/fargate_sandbox.py +546 -0
- lm_deluge/tool/prefab/sandbox/modal_sandbox.py +469 -0
- lm_deluge/tool/prefab/sandbox/seatbelt_sandbox.py +827 -0
- lm_deluge/tool/prefab/sheets.py +385 -0
- lm_deluge/tool/prefab/skills.py +0 -0
- lm_deluge/tool/prefab/subagents.py +233 -0
- lm_deluge/tool/prefab/todos.py +342 -0
- lm_deluge/tool/prefab/tool_search.py +169 -0
- lm_deluge/tool/prefab/web_search.py +199 -0
- lm_deluge/tracker.py +16 -13
- lm_deluge/util/schema.py +412 -0
- lm_deluge/warnings.py +8 -0
- {lm_deluge-0.0.67.dist-info → lm_deluge-0.0.90.dist-info}/METADATA +23 -9
- lm_deluge-0.0.90.dist-info/RECORD +132 -0
- lm_deluge/built_in_tools/anthropic/__init__.py +0 -128
- lm_deluge/built_in_tools/openai.py +0 -28
- lm_deluge/presets/cerebras.py +0 -17
- lm_deluge/presets/meta.py +0 -13
- lm_deluge/tool.py +0 -849
- lm_deluge-0.0.67.dist-info/RECORD +0 -72
- lm_deluge/{llm_tools → pipelines}/__init__.py +1 -1
- /lm_deluge/{llm_tools → pipelines}/classify.py +0 -0
- /lm_deluge/{llm_tools → pipelines}/extract.py +0 -0
- /lm_deluge/{llm_tools → pipelines}/locate.py +0 -0
- /lm_deluge/{llm_tools → pipelines}/ocr.py +0 -0
- /lm_deluge/{built_in_tools/anthropic/bash.py → skills/anthropic.py} +0 -0
- /lm_deluge/{built_in_tools/anthropic/computer_use.py → skills/compat.py} +0 -0
- /lm_deluge/{built_in_tools → tool/builtin}/anthropic/editor.py +0 -0
- /lm_deluge/{built_in_tools → tool/builtin}/base.py +0 -0
- {lm_deluge-0.0.67.dist-info → lm_deluge-0.0.90.dist-info}/WHEEL +0 -0
- {lm_deluge-0.0.67.dist-info → lm_deluge-0.0.90.dist-info}/licenses/LICENSE +0 -0
- {lm_deluge-0.0.67.dist-info → lm_deluge-0.0.90.dist-info}/top_level.txt +0 -0
lm_deluge/models/__init__.py
CHANGED
|
@@ -4,9 +4,10 @@ import random
|
|
|
4
4
|
from dataclasses import dataclass, field
|
|
5
5
|
|
|
6
6
|
from ..request_context import RequestContext
|
|
7
|
+
from .anthropic import ANTHROPIC_MODELS
|
|
7
8
|
|
|
8
9
|
# Import and register all provider models
|
|
9
|
-
from .
|
|
10
|
+
from .arcee import ARCEE_MODELS
|
|
10
11
|
from .bedrock import BEDROCK_MODELS
|
|
11
12
|
from .cerebras import CEREBRAS_MODELS
|
|
12
13
|
from .cohere import COHERE_MODELS
|
|
@@ -15,11 +16,14 @@ from .fireworks import FIREWORKS_MODELS
|
|
|
15
16
|
from .google import GOOGLE_MODELS
|
|
16
17
|
from .grok import XAI_MODELS
|
|
17
18
|
from .groq import GROQ_MODELS
|
|
19
|
+
from .kimi import KIMI_MODELS
|
|
18
20
|
from .meta import META_MODELS
|
|
21
|
+
from .minimax import MINIMAX_MODELS
|
|
19
22
|
from .mistral import MISTRAL_MODELS
|
|
20
23
|
from .openai import OPENAI_MODELS
|
|
21
24
|
from .openrouter import OPENROUTER_MODELS
|
|
22
25
|
from .together import TOGETHER_MODELS
|
|
26
|
+
from .zai import ZAI_MODELS
|
|
23
27
|
|
|
24
28
|
|
|
25
29
|
@dataclass
|
|
@@ -37,6 +41,9 @@ class APIModel:
|
|
|
37
41
|
supports_logprobs: bool = False
|
|
38
42
|
supports_responses: bool = False
|
|
39
43
|
reasoning_model: bool = False
|
|
44
|
+
supports_xhigh: bool = (
|
|
45
|
+
False # supports xhigh reasoning_effort (gpt-5.2, gpt-5.1-codex-max)
|
|
46
|
+
)
|
|
40
47
|
regions: list[str] | dict[str, int] = field(default_factory=list)
|
|
41
48
|
# tokens_per_minute: int | None = None
|
|
42
49
|
# requests_per_minute: int | None = None
|
|
@@ -96,6 +103,7 @@ def register_model(
|
|
|
96
103
|
supports_logprobs: bool = False,
|
|
97
104
|
supports_responses: bool = False,
|
|
98
105
|
reasoning_model: bool = False,
|
|
106
|
+
supports_xhigh: bool = False,
|
|
99
107
|
regions: list[str] | dict[str, int] = field(default_factory=list),
|
|
100
108
|
# tokens_per_minute: int | None = None,
|
|
101
109
|
# requests_per_minute: int | None = None,
|
|
@@ -115,6 +123,7 @@ def register_model(
|
|
|
115
123
|
supports_logprobs=supports_logprobs,
|
|
116
124
|
supports_responses=supports_responses,
|
|
117
125
|
reasoning_model=reasoning_model,
|
|
126
|
+
supports_xhigh=supports_xhigh,
|
|
118
127
|
regions=regions,
|
|
119
128
|
# tokens_per_minute=tokens_per_minute,
|
|
120
129
|
# requests_per_minute=requests_per_minute,
|
|
@@ -126,13 +135,17 @@ def register_model(
|
|
|
126
135
|
# Register all models from all providers
|
|
127
136
|
for model_dict in [
|
|
128
137
|
ANTHROPIC_MODELS,
|
|
138
|
+
ZAI_MODELS,
|
|
139
|
+
ARCEE_MODELS,
|
|
129
140
|
BEDROCK_MODELS,
|
|
130
141
|
COHERE_MODELS,
|
|
131
142
|
DEEPSEEK_MODELS,
|
|
132
143
|
FIREWORKS_MODELS,
|
|
133
144
|
GOOGLE_MODELS,
|
|
134
145
|
XAI_MODELS,
|
|
146
|
+
KIMI_MODELS,
|
|
135
147
|
META_MODELS,
|
|
148
|
+
MINIMAX_MODELS,
|
|
136
149
|
MISTRAL_MODELS,
|
|
137
150
|
OPENAI_MODELS,
|
|
138
151
|
OPENROUTER_MODELS,
|
lm_deluge/models/anthropic.py
CHANGED
|
@@ -10,6 +10,19 @@ ANTHROPIC_MODELS = {
|
|
|
10
10
|
# ░███
|
|
11
11
|
# █████
|
|
12
12
|
#
|
|
13
|
+
"claude-4.5-opus": {
|
|
14
|
+
"id": "claude-4.5-opus",
|
|
15
|
+
"name": "claude-opus-4-5-20251101",
|
|
16
|
+
"api_base": "https://api.anthropic.com/v1",
|
|
17
|
+
"api_key_env_var": "ANTHROPIC_API_KEY",
|
|
18
|
+
"supports_json": False,
|
|
19
|
+
"api_spec": "anthropic",
|
|
20
|
+
"input_cost": 5.0,
|
|
21
|
+
"cached_input_cost": 0.50,
|
|
22
|
+
"cache_write_cost": 6.25,
|
|
23
|
+
"output_cost": 25.0,
|
|
24
|
+
"reasoning_model": True,
|
|
25
|
+
},
|
|
13
26
|
"claude-4.5-haiku": {
|
|
14
27
|
"id": "claude-4.5-haiku",
|
|
15
28
|
"name": "claude-haiku-4-5-20251001",
|
|
@@ -21,25 +34,27 @@ ANTHROPIC_MODELS = {
|
|
|
21
34
|
"cached_input_cost": 0.10,
|
|
22
35
|
"cache_write_cost": 1.25,
|
|
23
36
|
"output_cost": 3.0,
|
|
37
|
+
"reasoning_model": True,
|
|
24
38
|
},
|
|
25
39
|
"claude-4.5-sonnet": {
|
|
26
40
|
"id": "claude-4.5-sonnet",
|
|
27
41
|
"name": "claude-sonnet-4-5-20250929",
|
|
28
42
|
"api_base": "https://api.anthropic.com/v1",
|
|
29
43
|
"api_key_env_var": "ANTHROPIC_API_KEY",
|
|
30
|
-
"supports_json":
|
|
44
|
+
"supports_json": True,
|
|
31
45
|
"api_spec": "anthropic",
|
|
32
46
|
"input_cost": 3.0,
|
|
33
47
|
"cached_input_cost": 0.30,
|
|
34
48
|
"cache_write_cost": 3.75,
|
|
35
49
|
"output_cost": 15.0,
|
|
50
|
+
"reasoning_model": True,
|
|
36
51
|
},
|
|
37
52
|
"claude-4.1-opus": {
|
|
38
53
|
"id": "claude-4.1-opus",
|
|
39
54
|
"name": "claude-opus-4-1-20250805",
|
|
40
55
|
"api_base": "https://api.anthropic.com/v1",
|
|
41
56
|
"api_key_env_var": "ANTHROPIC_API_KEY",
|
|
42
|
-
"supports_json":
|
|
57
|
+
"supports_json": True,
|
|
43
58
|
"api_spec": "anthropic",
|
|
44
59
|
"input_cost": 15.0,
|
|
45
60
|
"cached_input_cost": 1.50,
|
|
@@ -97,18 +112,18 @@ ANTHROPIC_MODELS = {
|
|
|
97
112
|
"cache_write_cost": 3.75,
|
|
98
113
|
"output_cost": 15.0,
|
|
99
114
|
},
|
|
100
|
-
"claude-3.5-sonnet": {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
},
|
|
115
|
+
# "claude-3.5-sonnet": {
|
|
116
|
+
# "id": "claude-3.5-sonnet",
|
|
117
|
+
# "name": "claude-3-5-sonnet-20240620",
|
|
118
|
+
# "api_base": "https://api.anthropic.com/v1",
|
|
119
|
+
# "api_key_env_var": "ANTHROPIC_API_KEY",
|
|
120
|
+
# "supports_json": False,
|
|
121
|
+
# "api_spec": "anthropic",
|
|
122
|
+
# "input_cost": 3.0,
|
|
123
|
+
# "cached_input_cost": 0.30,
|
|
124
|
+
# "cache_write_cost": 3.75,
|
|
125
|
+
# "output_cost": 15.0,
|
|
126
|
+
# },
|
|
112
127
|
"claude-3-opus": {
|
|
113
128
|
"id": "claude-3-opus",
|
|
114
129
|
"name": "claude-3-opus-20240229",
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
ARCEE_MODELS = {
|
|
2
|
+
"trinity-mini": {
|
|
3
|
+
"id": "trinity-mini",
|
|
4
|
+
"name": "trinity-mini",
|
|
5
|
+
"api_base": "https://api.arcee.ai/api/v1",
|
|
6
|
+
"api_key_env_var": "ARCEE_API_KEY",
|
|
7
|
+
"supports_json": True,
|
|
8
|
+
"supports_logprobs": False,
|
|
9
|
+
"supports_responses": False,
|
|
10
|
+
"api_spec": "openai",
|
|
11
|
+
"input_cost": 0.045,
|
|
12
|
+
"cached_input_cost": 0.045,
|
|
13
|
+
"output_cost": 0.15,
|
|
14
|
+
"reasoning_model": True,
|
|
15
|
+
}
|
|
16
|
+
}
|
lm_deluge/models/deepseek.py
CHANGED
|
@@ -12,8 +12,9 @@ DEEPSEEK_MODELS = {
|
|
|
12
12
|
"api_base": "https://api.deepseek.com/v1",
|
|
13
13
|
"api_key_env_var": "DEEPSEEK_API_KEY",
|
|
14
14
|
"api_spec": "openai",
|
|
15
|
-
"input_cost": 0.
|
|
16
|
-
"
|
|
15
|
+
"input_cost": 0.28,
|
|
16
|
+
"cached_input_cost": 0.028,
|
|
17
|
+
"output_cost": 0.42,
|
|
17
18
|
},
|
|
18
19
|
"deepseek-r1": {
|
|
19
20
|
"id": "deepseek-r1",
|
|
@@ -21,7 +22,38 @@ DEEPSEEK_MODELS = {
|
|
|
21
22
|
"api_base": "https://api.deepseek.com/v1",
|
|
22
23
|
"api_key_env_var": "DEEPSEEK_API_KEY",
|
|
23
24
|
"api_spec": "openai",
|
|
24
|
-
"input_cost": 0.
|
|
25
|
-
"
|
|
25
|
+
"input_cost": 0.28,
|
|
26
|
+
"cached_input_cost": 0.028,
|
|
27
|
+
"output_cost": 0.42,
|
|
28
|
+
},
|
|
29
|
+
"deepseek-reasoner": {
|
|
30
|
+
"id": "deepseek-reasoner",
|
|
31
|
+
"name": "deepseek-reasoner",
|
|
32
|
+
"api_base": "https://api.deepseek.com/v1",
|
|
33
|
+
"api_key_env_var": "DEEPSEEK_API_KEY",
|
|
34
|
+
"api_spec": "openai",
|
|
35
|
+
"input_cost": 0.28,
|
|
36
|
+
"cached_input_cost": 0.028,
|
|
37
|
+
"output_cost": 0.42,
|
|
38
|
+
},
|
|
39
|
+
"deepseek-reasoner-anthropic-compat": {
|
|
40
|
+
"id": "deepseek-reasoner-anthropic-compat",
|
|
41
|
+
"name": "deepseek-reasoner",
|
|
42
|
+
"api_base": "https://api.deepseek.com/anthropic",
|
|
43
|
+
"api_key_env_var": "DEEPSEEK_API_KEY",
|
|
44
|
+
"api_spec": "anthropic",
|
|
45
|
+
"input_cost": 0.28,
|
|
46
|
+
"cached_input_cost": 0.028,
|
|
47
|
+
"output_cost": 0.42,
|
|
48
|
+
},
|
|
49
|
+
"deepseek-speciale": {
|
|
50
|
+
"id": "deepseek-speciale",
|
|
51
|
+
"name": "deepseek-reasoner",
|
|
52
|
+
"api_base": "https://api.deepseek.com/v3.2_speciale_expires_on_20251215/v1",
|
|
53
|
+
"api_key_env_var": "DEEPSEEK_API_KEY",
|
|
54
|
+
"api_spec": "openai",
|
|
55
|
+
"input_cost": 0.28,
|
|
56
|
+
"cached_input_cost": 0.028,
|
|
57
|
+
"output_cost": 0.42,
|
|
26
58
|
},
|
|
27
59
|
}
|
lm_deluge/models/google.py
CHANGED
|
@@ -138,4 +138,46 @@ GOOGLE_MODELS = {
|
|
|
138
138
|
"output_cost": 0.4,
|
|
139
139
|
"reasoning_model": True,
|
|
140
140
|
},
|
|
141
|
+
# Gemini 3 models - advanced reasoning with thought signatures
|
|
142
|
+
"gemini-3-pro-preview": {
|
|
143
|
+
"id": "gemini-3-pro-preview",
|
|
144
|
+
"name": "gemini-3-pro-preview",
|
|
145
|
+
"api_base": "https://generativelanguage.googleapis.com/v1alpha",
|
|
146
|
+
"api_key_env_var": "GEMINI_API_KEY",
|
|
147
|
+
"supports_json": True,
|
|
148
|
+
"supports_logprobs": False,
|
|
149
|
+
"api_spec": "gemini",
|
|
150
|
+
"input_cost": 2.0, # <200k tokens
|
|
151
|
+
"cached_input_cost": 0.5, # estimated
|
|
152
|
+
"output_cost": 12.0, # <200k tokens
|
|
153
|
+
# Note: >200k tokens pricing is $4/$18 per million
|
|
154
|
+
"reasoning_model": True,
|
|
155
|
+
},
|
|
156
|
+
"gemini-3-flash-preview": {
|
|
157
|
+
"id": "gemini-3-flash-preview",
|
|
158
|
+
"name": "gemini-3-flash-preview",
|
|
159
|
+
"api_base": "https://generativelanguage.googleapis.com/v1alpha",
|
|
160
|
+
"api_key_env_var": "GEMINI_API_KEY",
|
|
161
|
+
"supports_json": True,
|
|
162
|
+
"supports_logprobs": False,
|
|
163
|
+
"api_spec": "gemini",
|
|
164
|
+
"input_cost": 0.5,
|
|
165
|
+
"cached_input_cost": 0.125, # estimated
|
|
166
|
+
"output_cost": 3.0,
|
|
167
|
+
"reasoning_model": True,
|
|
168
|
+
},
|
|
169
|
+
# Gemini 2.5 Computer Use model
|
|
170
|
+
"gemini-2.5-computer-use": {
|
|
171
|
+
"id": "gemini-2.5-computer-use",
|
|
172
|
+
"name": "gemini-2.5-computer-use-preview-10-2025",
|
|
173
|
+
"api_base": "https://generativelanguage.googleapis.com/v1beta",
|
|
174
|
+
"api_key_env_var": "GEMINI_API_KEY",
|
|
175
|
+
"supports_json": True,
|
|
176
|
+
"supports_logprobs": False,
|
|
177
|
+
"api_spec": "gemini",
|
|
178
|
+
"input_cost": 1.25, # same as gemini-2.5-pro for now
|
|
179
|
+
"cached_input_cost": 0.31,
|
|
180
|
+
"output_cost": 10.0,
|
|
181
|
+
"reasoning_model": True,
|
|
182
|
+
},
|
|
141
183
|
}
|
lm_deluge/models/grok.py
CHANGED
|
@@ -7,6 +7,30 @@ XAI_MODELS = {
|
|
|
7
7
|
# 888 888 888 888 888 888888K
|
|
8
8
|
# Y88b d88P 888 Y88..88P 888 "88b
|
|
9
9
|
# "Y8888P88 888 "Y88P" 888 888
|
|
10
|
+
"grok-4.1-fast-reasoning": {
|
|
11
|
+
"id": "grok-4.1-fast-reasoning",
|
|
12
|
+
"name": "grok-4-1-fast-reasoning",
|
|
13
|
+
"api_base": "https://api.x.ai/v1",
|
|
14
|
+
"api_key_env_var": "GROK_API_KEY",
|
|
15
|
+
"supports_json": True,
|
|
16
|
+
"supports_logprobs": True,
|
|
17
|
+
"api_spec": "openai",
|
|
18
|
+
"input_cost": 0.2,
|
|
19
|
+
"output_cost": 1.5,
|
|
20
|
+
"reasoning_model": False,
|
|
21
|
+
},
|
|
22
|
+
"grok-4.1-fast": {
|
|
23
|
+
"id": "grok-4.1-fast",
|
|
24
|
+
"name": "grok-4-1-fast-non-reasoning",
|
|
25
|
+
"api_base": "https://api.x.ai/v1",
|
|
26
|
+
"api_key_env_var": "GROK_API_KEY",
|
|
27
|
+
"supports_json": True,
|
|
28
|
+
"supports_logprobs": True,
|
|
29
|
+
"api_spec": "openai",
|
|
30
|
+
"input_cost": 0.2,
|
|
31
|
+
"output_cost": 1.5,
|
|
32
|
+
"reasoning_model": False,
|
|
33
|
+
},
|
|
10
34
|
"grok-code-fast-1": {
|
|
11
35
|
"id": "grok-code-fast-1",
|
|
12
36
|
"name": "grok-code-fast-1",
|
lm_deluge/models/kimi.py
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
KIMI_MODELS = {
|
|
2
|
+
"kimi-k2": {
|
|
3
|
+
"id": "kimi-k2",
|
|
4
|
+
"name": "kimi-k2-0905-preview",
|
|
5
|
+
"api_base": "https://api.moonshot.ai/anthropic/v1",
|
|
6
|
+
"api_key_env_var": "MOONSHOT_API_KEY",
|
|
7
|
+
"supports_json": True,
|
|
8
|
+
"api_spec": "anthropic",
|
|
9
|
+
},
|
|
10
|
+
"kimi-k2-turbo": {
|
|
11
|
+
"id": "kimi-k2-turbo",
|
|
12
|
+
"name": "kimi-k2-turbo-preview",
|
|
13
|
+
"api_base": "https://api.moonshot.ai/anthropic/v1",
|
|
14
|
+
"api_key_env_var": "MOONSHOT_API_KEY",
|
|
15
|
+
"supports_json": True,
|
|
16
|
+
"api_spec": "anthropic",
|
|
17
|
+
},
|
|
18
|
+
"kimi-k2-thinking": {
|
|
19
|
+
"id": "kimi-k2-thinking",
|
|
20
|
+
"name": "kimi-k2-thinking",
|
|
21
|
+
"api_base": "https://api.moonshot.ai/anthropic/v1",
|
|
22
|
+
"api_key_env_var": "MOONSHOT_API_KEY",
|
|
23
|
+
"supports_json": True,
|
|
24
|
+
"api_spec": "anthropic",
|
|
25
|
+
"reasoning_model": True,
|
|
26
|
+
},
|
|
27
|
+
"kimi-k2-thinking-turbo": {
|
|
28
|
+
"id": "kimi-k2-thinking-turbo",
|
|
29
|
+
"name": "kimi-k2-thinking-turbo",
|
|
30
|
+
"api_base": "https://api.moonshot.ai/anthropic/v1",
|
|
31
|
+
"api_key_env_var": "MOONSHOT_API_KEY",
|
|
32
|
+
"supports_json": True,
|
|
33
|
+
"api_spec": "anthropic",
|
|
34
|
+
"reasoning_model": True,
|
|
35
|
+
},
|
|
36
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
MINIMAX_MODELS = {
|
|
2
|
+
"minimax-m2.1": {
|
|
3
|
+
"id": "minimax-m2.1",
|
|
4
|
+
"name": "MiniMax-M2.1",
|
|
5
|
+
"api_base": "https://api.minimax.io/anthropic/v1",
|
|
6
|
+
"api_key_env_var": "MINIMAX_API_KEY",
|
|
7
|
+
"supports_json": False,
|
|
8
|
+
"api_spec": "anthropic",
|
|
9
|
+
},
|
|
10
|
+
"minimax-m2": {
|
|
11
|
+
"id": "minimax-m2",
|
|
12
|
+
"name": "MiniMax-M2",
|
|
13
|
+
"api_base": "https://api.minimax.io/anthropic/v1",
|
|
14
|
+
"api_key_env_var": "MINIMAX_API_KEY",
|
|
15
|
+
"supports_json": False,
|
|
16
|
+
"api_spec": "anthropic",
|
|
17
|
+
},
|
|
18
|
+
}
|
lm_deluge/models/openai.py
CHANGED
|
@@ -10,6 +10,78 @@ OPENAI_MODELS = {
|
|
|
10
10
|
# ░███
|
|
11
11
|
# █████
|
|
12
12
|
# ░░░░░
|
|
13
|
+
"gpt-5.2": {
|
|
14
|
+
"id": "gpt-5.2",
|
|
15
|
+
"name": "gpt-5.2",
|
|
16
|
+
"api_base": "https://api.openai.com/v1",
|
|
17
|
+
"api_key_env_var": "OPENAI_API_KEY",
|
|
18
|
+
"supports_json": True,
|
|
19
|
+
"supports_logprobs": False,
|
|
20
|
+
"supports_responses": True,
|
|
21
|
+
"api_spec": "openai",
|
|
22
|
+
"input_cost": 1.75,
|
|
23
|
+
"cached_input_cost": 0.175,
|
|
24
|
+
"output_cost": 14.0,
|
|
25
|
+
"reasoning_model": True,
|
|
26
|
+
"supports_xhigh": True,
|
|
27
|
+
},
|
|
28
|
+
"gpt-5.1-codex-max": {
|
|
29
|
+
"id": "gpt-5.1-codex-max",
|
|
30
|
+
"name": "gpt-5.1-codex-max",
|
|
31
|
+
"api_base": "https://api.openai.com/v1",
|
|
32
|
+
"api_key_env_var": "OPENAI_API_KEY",
|
|
33
|
+
"supports_json": True,
|
|
34
|
+
"supports_logprobs": False,
|
|
35
|
+
"supports_responses": True,
|
|
36
|
+
"api_spec": "openai",
|
|
37
|
+
"input_cost": 1.25,
|
|
38
|
+
"cached_input_cost": 0.125,
|
|
39
|
+
"output_cost": 10.0,
|
|
40
|
+
"reasoning_model": True,
|
|
41
|
+
"supports_xhigh": True,
|
|
42
|
+
},
|
|
43
|
+
"gpt-5.1": {
|
|
44
|
+
"id": "gpt-5.1",
|
|
45
|
+
"name": "gpt-5.1",
|
|
46
|
+
"api_base": "https://api.openai.com/v1",
|
|
47
|
+
"api_key_env_var": "OPENAI_API_KEY",
|
|
48
|
+
"supports_json": True,
|
|
49
|
+
"supports_logprobs": True,
|
|
50
|
+
"supports_responses": True,
|
|
51
|
+
"api_spec": "openai",
|
|
52
|
+
"input_cost": 1.25,
|
|
53
|
+
"cached_input_cost": 0.125,
|
|
54
|
+
"output_cost": 10.0,
|
|
55
|
+
"reasoning_model": True,
|
|
56
|
+
},
|
|
57
|
+
"gpt-5.1-codex": {
|
|
58
|
+
"id": "gpt-5.1-codex",
|
|
59
|
+
"name": "gpt-5.1-codex",
|
|
60
|
+
"api_base": "https://api.openai.com/v1",
|
|
61
|
+
"api_key_env_var": "OPENAI_API_KEY",
|
|
62
|
+
"supports_json": False,
|
|
63
|
+
"supports_logprobs": True,
|
|
64
|
+
"supports_responses": True,
|
|
65
|
+
"api_spec": "openai",
|
|
66
|
+
"input_cost": 1.25,
|
|
67
|
+
"cached_input_cost": 0.125,
|
|
68
|
+
"output_cost": 10.0,
|
|
69
|
+
"reasoning_model": True,
|
|
70
|
+
},
|
|
71
|
+
"gpt-5.1-codex-mini": {
|
|
72
|
+
"id": "gpt-5.1-codex-mini",
|
|
73
|
+
"name": "gpt-5.1-codex-mini",
|
|
74
|
+
"api_base": "https://api.openai.com/v1",
|
|
75
|
+
"api_key_env_var": "OPENAI_API_KEY",
|
|
76
|
+
"supports_json": False,
|
|
77
|
+
"supports_logprobs": True,
|
|
78
|
+
"supports_responses": True,
|
|
79
|
+
"api_spec": "openai",
|
|
80
|
+
"input_cost": 0.25,
|
|
81
|
+
"cached_input_cost": 0.025,
|
|
82
|
+
"output_cost": 2.0,
|
|
83
|
+
"reasoning_model": True,
|
|
84
|
+
},
|
|
13
85
|
"gpt-5-codex": {
|
|
14
86
|
"id": "gpt-5-codex",
|
|
15
87
|
"name": "gpt-5-codex",
|
|
@@ -107,6 +179,34 @@ OPENAI_MODELS = {
|
|
|
107
179
|
"output_cost": 6.0,
|
|
108
180
|
"reasoning_model": True,
|
|
109
181
|
},
|
|
182
|
+
"o4-mini-deep-research": {
|
|
183
|
+
"id": "o4-mini-deep-research",
|
|
184
|
+
"name": "o4-mini-deep-research",
|
|
185
|
+
"api_base": "https://api.openai.com/v1",
|
|
186
|
+
"api_key_env_var": "OPENAI_API_KEY",
|
|
187
|
+
"supports_json": True,
|
|
188
|
+
"supports_logprobs": False,
|
|
189
|
+
"supports_responses": True,
|
|
190
|
+
"api_spec": "openai",
|
|
191
|
+
"input_cost": 2,
|
|
192
|
+
"cached_input_cost": 0.5,
|
|
193
|
+
"output_cost": 8.0,
|
|
194
|
+
"reasoning_model": True,
|
|
195
|
+
},
|
|
196
|
+
"o3-deep-research": {
|
|
197
|
+
"id": "o3-deep-research",
|
|
198
|
+
"name": "o3-deep-research",
|
|
199
|
+
"api_base": "https://api.openai.com/v1",
|
|
200
|
+
"api_key_env_var": "OPENAI_API_KEY",
|
|
201
|
+
"supports_json": True,
|
|
202
|
+
"supports_logprobs": False,
|
|
203
|
+
"supports_responses": True,
|
|
204
|
+
"api_spec": "openai",
|
|
205
|
+
"input_cost": 10,
|
|
206
|
+
"cached_input_cost": 2.50,
|
|
207
|
+
"output_cost": 40.0,
|
|
208
|
+
"reasoning_model": True,
|
|
209
|
+
},
|
|
110
210
|
"o3": {
|
|
111
211
|
"id": "o3",
|
|
112
212
|
"name": "o3-2025-04-16",
|
lm_deluge/models/openrouter.py
CHANGED
|
@@ -1,13 +1,25 @@
|
|
|
1
1
|
OPENROUTER_MODELS = {
|
|
2
|
+
"intellect-3-openrouter": {
|
|
3
|
+
"id": "intellect-3-openrouter",
|
|
4
|
+
"name": "prime-intellect/intellect-3",
|
|
5
|
+
"api_base": "https://openrouter.ai/api/v1",
|
|
6
|
+
"api_key_env_var": "OPENROUTER_API_KEY",
|
|
7
|
+
"supports_json": True,
|
|
8
|
+
"api_spec": "openai",
|
|
9
|
+
"input_cost": 0.2,
|
|
10
|
+
"cached_input_cost": 0.2,
|
|
11
|
+
"cache_write_cost": 0.2,
|
|
12
|
+
"output_cost": 1.10,
|
|
13
|
+
},
|
|
2
14
|
"glm-4.6-openrouter": {
|
|
3
15
|
"id": "glm-4.6-openrouter",
|
|
4
|
-
"name": "z-ai/glm-4.6",
|
|
16
|
+
"name": "z-ai/glm-4.6:exacto",
|
|
5
17
|
"api_base": "https://openrouter.ai/api/v1",
|
|
6
18
|
"api_key_env_var": "OPENROUTER_API_KEY",
|
|
7
19
|
"supports_json": True,
|
|
8
20
|
"api_spec": "openai",
|
|
9
21
|
"input_cost": 0.6,
|
|
10
|
-
"cached_input_cost": 0.
|
|
22
|
+
"cached_input_cost": 0.6,
|
|
11
23
|
"cache_write_cost": 0.6,
|
|
12
24
|
"output_cost": 2.20,
|
|
13
25
|
},
|
|
@@ -35,9 +47,21 @@ OPENROUTER_MODELS = {
|
|
|
35
47
|
"cache_write_cost": 0.23,
|
|
36
48
|
"output_cost": 0.9,
|
|
37
49
|
},
|
|
50
|
+
"deepseek-3.2-exp-openrouter": {
|
|
51
|
+
"id": "deepseek-3.2-exp-openrouter",
|
|
52
|
+
"name": "deepseek/deepseek-v3.2-exp",
|
|
53
|
+
"api_base": "https://openrouter.ai/api/v1",
|
|
54
|
+
"api_key_env_var": "OPENROUTER_API_KEY",
|
|
55
|
+
"supports_json": True,
|
|
56
|
+
"api_spec": "openai",
|
|
57
|
+
"input_cost": 0.27,
|
|
58
|
+
"cached_input_cost": 0.27,
|
|
59
|
+
"cache_write_cost": 0.27,
|
|
60
|
+
"output_cost": 0.4,
|
|
61
|
+
},
|
|
38
62
|
"deepseek-3.2-openrouter": {
|
|
39
63
|
"id": "deepseek-3.2-openrouter",
|
|
40
|
-
"name": "deepseek/deepseek-v3.2
|
|
64
|
+
"name": "deepseek/deepseek-v3.2",
|
|
41
65
|
"api_base": "https://openrouter.ai/api/v1",
|
|
42
66
|
"api_key_env_var": "OPENROUTER_API_KEY",
|
|
43
67
|
"supports_json": True,
|
|
@@ -47,18 +71,120 @@ OPENROUTER_MODELS = {
|
|
|
47
71
|
"cache_write_cost": 0.27,
|
|
48
72
|
"output_cost": 0.4,
|
|
49
73
|
},
|
|
50
|
-
|
|
51
|
-
|
|
74
|
+
"gpt-oss-20b-openrouter": {
|
|
75
|
+
"id": "gpt-oss-20b-openrouter",
|
|
76
|
+
"name": "openai/gpt-oss-20b",
|
|
77
|
+
"api_base": "https://openrouter.ai/api/v1",
|
|
78
|
+
"api_key_env_var": "OPENROUTER_API_KEY",
|
|
79
|
+
"supports_json": True,
|
|
80
|
+
"api_spec": "openai",
|
|
81
|
+
"input_cost": 0.04,
|
|
82
|
+
"cached_input_cost": 0.04,
|
|
83
|
+
"cache_write_cost": 0.04,
|
|
84
|
+
"output_cost": 0.18,
|
|
85
|
+
},
|
|
86
|
+
"gpt-oss-20b-free-openrouter": {
|
|
87
|
+
"id": "gpt-oss-20b-openrouter",
|
|
88
|
+
"name": "openai/gpt-oss-20b:free",
|
|
89
|
+
"api_base": "https://openrouter.ai/api/v1",
|
|
90
|
+
"api_key_env_var": "OPENROUTER_API_KEY",
|
|
91
|
+
"supports_json": True,
|
|
92
|
+
"api_spec": "openai",
|
|
93
|
+
"input_cost": 0.0,
|
|
94
|
+
"cached_input_cost": 0.0,
|
|
95
|
+
"cache_write_cost": 0.0,
|
|
96
|
+
"output_cost": 0.0,
|
|
97
|
+
},
|
|
98
|
+
"gpt-oss-120b-openrouter": {
|
|
99
|
+
"id": "gpt-oss-120b-openrouter",
|
|
100
|
+
"name": "openai/gpt-oss-120b",
|
|
101
|
+
"api_base": "https://openrouter.ai/api/v1",
|
|
102
|
+
"api_key_env_var": "OPENROUTER_API_KEY",
|
|
103
|
+
"supports_json": True,
|
|
104
|
+
"api_spec": "openai",
|
|
105
|
+
"input_cost": 0.05,
|
|
106
|
+
"cached_input_cost": 0.05,
|
|
107
|
+
"cache_write_cost": 0.05,
|
|
108
|
+
"output_cost": 0.45,
|
|
109
|
+
},
|
|
110
|
+
"gpt-oss-120b-free-openrouter": {
|
|
111
|
+
"id": "gpt-oss-120b-free-openrouter",
|
|
112
|
+
"name": "openai/gpt-oss-120b:free",
|
|
113
|
+
"api_base": "https://openrouter.ai/api/v1",
|
|
114
|
+
"api_key_env_var": "OPENROUTER_API_KEY",
|
|
115
|
+
"supports_json": True,
|
|
116
|
+
"api_spec": "openai",
|
|
117
|
+
"input_cost": 0.00,
|
|
118
|
+
"cached_input_cost": 0.00,
|
|
119
|
+
"cache_write_cost": 0.00,
|
|
120
|
+
"output_cost": 0.0,
|
|
121
|
+
},
|
|
52
122
|
"kimi-k2-openrouter": {
|
|
53
123
|
"id": "kimi-k2-openrouter",
|
|
54
|
-
"name": "
|
|
124
|
+
"name": "moonshotai/kimi-k2-0905:exacto",
|
|
125
|
+
"api_base": "https://openrouter.ai/api/v1",
|
|
126
|
+
"api_key_env_var": "OPENROUTER_API_KEY",
|
|
127
|
+
"supports_json": True,
|
|
128
|
+
"api_spec": "openai",
|
|
129
|
+
"input_cost": 1,
|
|
130
|
+
"cached_input_cost": 1,
|
|
131
|
+
"cache_write_cost": 1,
|
|
132
|
+
"output_cost": 3,
|
|
133
|
+
},
|
|
134
|
+
"kimi-k2-thinking-openrouter": {
|
|
135
|
+
"id": "kimi-k2-thinking-openrouter",
|
|
136
|
+
"name": "moonshotai/kimi-k2-thinking",
|
|
55
137
|
"api_base": "https://openrouter.ai/api/v1",
|
|
56
138
|
"api_key_env_var": "OPENROUTER_API_KEY",
|
|
57
139
|
"supports_json": True,
|
|
58
140
|
"api_spec": "openai",
|
|
59
141
|
"input_cost": 0.6,
|
|
60
|
-
"cached_input_cost": 0.
|
|
142
|
+
"cached_input_cost": 0.6,
|
|
143
|
+
"cache_write_cost": 0.6,
|
|
144
|
+
"output_cost": 2.5,
|
|
145
|
+
},
|
|
146
|
+
"olmo-3-32b-think-openrouter": {
|
|
147
|
+
"id": "olmo-3-32b-think-openrouter",
|
|
148
|
+
"name": "allenai/olmo-3-32b-think",
|
|
149
|
+
"api_base": "https://openrouter.ai/api/v1",
|
|
150
|
+
"api_key_env_var": "OPENROUTER_API_KEY",
|
|
151
|
+
"supports_json": True,
|
|
152
|
+
"api_spec": "openai",
|
|
153
|
+
"input_cost": 0.2,
|
|
154
|
+
"output_cost": 35,
|
|
155
|
+
},
|
|
156
|
+
"trinity-mini-openrouter": {
|
|
157
|
+
"id": "trinity-mini-openrouter",
|
|
158
|
+
"name": "arcee-ai/trinity-mini:free",
|
|
159
|
+
"api_base": "https://openrouter.ai/api/v1",
|
|
160
|
+
"api_key_env_var": "OPENROUTER_API_KEY",
|
|
161
|
+
"supports_json": True,
|
|
162
|
+
"api_spec": "openai",
|
|
163
|
+
"input_cost": 0.045,
|
|
164
|
+
"output_cost": 0.15,
|
|
165
|
+
},
|
|
166
|
+
"glm-4.7-openrouter": {
|
|
167
|
+
"id": "glm-4.7-openrouter",
|
|
168
|
+
"name": "z-ai/glm-4.7",
|
|
169
|
+
"api_base": "https://openrouter.ai/api/v1",
|
|
170
|
+
"api_key_env_var": "OPENROUTER_API_KEY",
|
|
171
|
+
"supports_json": True,
|
|
172
|
+
"api_spec": "openai",
|
|
173
|
+
"input_cost": 0.6,
|
|
174
|
+
"cached_input_cost": 0.6,
|
|
61
175
|
"cache_write_cost": 0.6,
|
|
62
176
|
"output_cost": 2.20,
|
|
63
177
|
},
|
|
178
|
+
"minimax-m2.1-openrouter": {
|
|
179
|
+
"id": "minimax-m2.1-openrouter",
|
|
180
|
+
"name": "minimax/minimax-m2.1",
|
|
181
|
+
"api_base": "https://openrouter.ai/api/v1",
|
|
182
|
+
"api_key_env_var": "OPENROUTER_API_KEY",
|
|
183
|
+
"supports_json": True,
|
|
184
|
+
"api_spec": "openai",
|
|
185
|
+
"input_cost": 0.3,
|
|
186
|
+
"cached_input_cost": 0.3,
|
|
187
|
+
"cache_write_cost": 0.3,
|
|
188
|
+
"output_cost": 1.20,
|
|
189
|
+
},
|
|
64
190
|
}
|
lm_deluge/models/together.py
CHANGED
|
@@ -93,4 +93,15 @@ TOGETHER_MODELS = {
|
|
|
93
93
|
"output_cost": 0.59,
|
|
94
94
|
"reasoning_model": True,
|
|
95
95
|
},
|
|
96
|
+
"trinity-mini-together": {
|
|
97
|
+
"id": "trinity-mini-together",
|
|
98
|
+
"name": "arcee-ai/trinity-mini",
|
|
99
|
+
"api_base": "https://api.together.xyz/v1",
|
|
100
|
+
"api_key_env_var": "TOGETHER_API_KEY",
|
|
101
|
+
"supports_json": False,
|
|
102
|
+
"api_spec": "openai",
|
|
103
|
+
"input_cost": 0.18,
|
|
104
|
+
"output_cost": 0.59,
|
|
105
|
+
"reasoning_model": True,
|
|
106
|
+
},
|
|
96
107
|
}
|