mycode-sdk 0.9.2__tar.gz → 0.9.3__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.
- {mycode_sdk-0.9.2 → mycode_sdk-0.9.3}/PKG-INFO +1 -1
- {mycode_sdk-0.9.2 → mycode_sdk-0.9.3}/pyproject.toml +1 -1
- {mycode_sdk-0.9.2 → mycode_sdk-0.9.3}/src/mycode/models_catalog.json +32 -18
- {mycode_sdk-0.9.2 → mycode_sdk-0.9.3}/src/mycode/providers/anthropic_like.py +22 -5
- {mycode_sdk-0.9.2 → mycode_sdk-0.9.3}/.gitignore +0 -0
- {mycode_sdk-0.9.2 → mycode_sdk-0.9.3}/LICENSE +0 -0
- {mycode_sdk-0.9.2 → mycode_sdk-0.9.3}/README.md +0 -0
- {mycode_sdk-0.9.2 → mycode_sdk-0.9.3}/src/mycode/__init__.py +0 -0
- {mycode_sdk-0.9.2 → mycode_sdk-0.9.3}/src/mycode/agent.py +0 -0
- {mycode_sdk-0.9.2 → mycode_sdk-0.9.3}/src/mycode/attachments.py +0 -0
- {mycode_sdk-0.9.2 → mycode_sdk-0.9.3}/src/mycode/compact.py +0 -0
- {mycode_sdk-0.9.2 → mycode_sdk-0.9.3}/src/mycode/hooks.py +0 -0
- {mycode_sdk-0.9.2 → mycode_sdk-0.9.3}/src/mycode/messages.py +0 -0
- {mycode_sdk-0.9.2 → mycode_sdk-0.9.3}/src/mycode/models.py +0 -0
- {mycode_sdk-0.9.2 → mycode_sdk-0.9.3}/src/mycode/providers/__init__.py +0 -0
- {mycode_sdk-0.9.2 → mycode_sdk-0.9.3}/src/mycode/providers/base.py +0 -0
- {mycode_sdk-0.9.2 → mycode_sdk-0.9.3}/src/mycode/providers/gemini.py +0 -0
- {mycode_sdk-0.9.2 → mycode_sdk-0.9.3}/src/mycode/providers/openai_chat.py +0 -0
- {mycode_sdk-0.9.2 → mycode_sdk-0.9.3}/src/mycode/providers/openai_responses.py +0 -0
- {mycode_sdk-0.9.2 → mycode_sdk-0.9.3}/src/mycode/py.typed +0 -0
- {mycode_sdk-0.9.2 → mycode_sdk-0.9.3}/src/mycode/session.py +0 -0
- {mycode_sdk-0.9.2 → mycode_sdk-0.9.3}/src/mycode/tools.py +0 -0
- {mycode_sdk-0.9.2 → mycode_sdk-0.9.3}/src/mycode/utils.py +0 -0
|
@@ -360,6 +360,20 @@
|
|
|
360
360
|
"supports_image_input": true,
|
|
361
361
|
"supports_pdf_input": false,
|
|
362
362
|
"supports_reasoning": true
|
|
363
|
+
},
|
|
364
|
+
"gemma-4-E2B-it": {
|
|
365
|
+
"context_window": 131072,
|
|
366
|
+
"max_output_tokens": 8192,
|
|
367
|
+
"supports_image_input": true,
|
|
368
|
+
"supports_pdf_input": false,
|
|
369
|
+
"supports_reasoning": true
|
|
370
|
+
},
|
|
371
|
+
"gemma-4-E4B-it": {
|
|
372
|
+
"context_window": 131072,
|
|
373
|
+
"max_output_tokens": 8192,
|
|
374
|
+
"supports_image_input": true,
|
|
375
|
+
"supports_pdf_input": false,
|
|
376
|
+
"supports_reasoning": true
|
|
363
377
|
}
|
|
364
378
|
},
|
|
365
379
|
"minimax": {
|
|
@@ -469,6 +483,13 @@
|
|
|
469
483
|
"supports_image_input": true,
|
|
470
484
|
"supports_pdf_input": false,
|
|
471
485
|
"supports_reasoning": true
|
|
486
|
+
},
|
|
487
|
+
"kimi-k2.7-code-highspeed": {
|
|
488
|
+
"context_window": 262144,
|
|
489
|
+
"max_output_tokens": 262144,
|
|
490
|
+
"supports_image_input": true,
|
|
491
|
+
"supports_pdf_input": false,
|
|
492
|
+
"supports_reasoning": true
|
|
472
493
|
}
|
|
473
494
|
},
|
|
474
495
|
"openai": {
|
|
@@ -922,13 +943,6 @@
|
|
|
922
943
|
"supports_pdf_input": false,
|
|
923
944
|
"supports_reasoning": false
|
|
924
945
|
},
|
|
925
|
-
"anthropic/claude-fable-5": {
|
|
926
|
-
"context_window": 1000000,
|
|
927
|
-
"max_output_tokens": 128000,
|
|
928
|
-
"supports_image_input": true,
|
|
929
|
-
"supports_pdf_input": true,
|
|
930
|
-
"supports_reasoning": true
|
|
931
|
-
},
|
|
932
946
|
"anthropic/claude-haiku-4.5": {
|
|
933
947
|
"context_window": 200000,
|
|
934
948
|
"max_output_tokens": 64000,
|
|
@@ -1174,13 +1188,6 @@
|
|
|
1174
1188
|
"supports_pdf_input": false,
|
|
1175
1189
|
"supports_reasoning": true
|
|
1176
1190
|
},
|
|
1177
|
-
"deepseek/deepseek-r1-distill-qwen-32b": {
|
|
1178
|
-
"context_window": 32768,
|
|
1179
|
-
"max_output_tokens": 32768,
|
|
1180
|
-
"supports_image_input": false,
|
|
1181
|
-
"supports_pdf_input": false,
|
|
1182
|
-
"supports_reasoning": true
|
|
1183
|
-
},
|
|
1184
1191
|
"deepseek/deepseek-v3.1-terminus": {
|
|
1185
1192
|
"context_window": 163840,
|
|
1186
1193
|
"max_output_tokens": 32768,
|
|
@@ -1204,7 +1211,7 @@
|
|
|
1204
1211
|
},
|
|
1205
1212
|
"deepseek/deepseek-v4-flash": {
|
|
1206
1213
|
"context_window": 1048575,
|
|
1207
|
-
"max_output_tokens":
|
|
1214
|
+
"max_output_tokens": 65536,
|
|
1208
1215
|
"supports_image_input": false,
|
|
1209
1216
|
"supports_pdf_input": false,
|
|
1210
1217
|
"supports_reasoning": true
|
|
@@ -2435,7 +2442,7 @@
|
|
|
2435
2442
|
"supports_reasoning": true
|
|
2436
2443
|
},
|
|
2437
2444
|
"openrouter/fusion": {
|
|
2438
|
-
"context_window":
|
|
2445
|
+
"context_window": 1000000,
|
|
2439
2446
|
"max_output_tokens": 128000,
|
|
2440
2447
|
"supports_image_input": false,
|
|
2441
2448
|
"supports_pdf_input": false,
|
|
@@ -2772,13 +2779,13 @@
|
|
|
2772
2779
|
},
|
|
2773
2780
|
"qwen/qwen3.5-35b-a3b": {
|
|
2774
2781
|
"context_window": 262144,
|
|
2775
|
-
"max_output_tokens":
|
|
2782
|
+
"max_output_tokens": 81920,
|
|
2776
2783
|
"supports_image_input": true,
|
|
2777
2784
|
"supports_pdf_input": false,
|
|
2778
2785
|
"supports_reasoning": true
|
|
2779
2786
|
},
|
|
2780
2787
|
"qwen/qwen3.5-397b-a17b": {
|
|
2781
|
-
"context_window":
|
|
2788
|
+
"context_window": 131072,
|
|
2782
2789
|
"max_output_tokens": 65536,
|
|
2783
2790
|
"supports_image_input": true,
|
|
2784
2791
|
"supports_pdf_input": false,
|
|
@@ -3120,6 +3127,13 @@
|
|
|
3120
3127
|
"supports_pdf_input": false,
|
|
3121
3128
|
"supports_reasoning": true
|
|
3122
3129
|
},
|
|
3130
|
+
"z-ai/glm-5.2": {
|
|
3131
|
+
"context_window": 1048576,
|
|
3132
|
+
"max_output_tokens": 131072,
|
|
3133
|
+
"supports_image_input": false,
|
|
3134
|
+
"supports_pdf_input": false,
|
|
3135
|
+
"supports_reasoning": true
|
|
3136
|
+
},
|
|
3123
3137
|
"~anthropic/claude-fable-latest": {
|
|
3124
3138
|
"context_window": 1000000,
|
|
3125
3139
|
"max_output_tokens": 128000,
|
|
@@ -41,7 +41,11 @@ class AnthropicLikeAdapter(ProviderAdapter):
|
|
|
41
41
|
return None
|
|
42
42
|
|
|
43
43
|
def _build_request_payload(self, request: ProviderRequest) -> dict[str, Any]:
|
|
44
|
-
messages = [
|
|
44
|
+
messages = []
|
|
45
|
+
for replay_message in self.prepare_messages(request):
|
|
46
|
+
message = self._serialize_message(replay_message)
|
|
47
|
+
if message["content"]:
|
|
48
|
+
messages.append(message)
|
|
45
49
|
self._apply_cache_control(messages)
|
|
46
50
|
thinking = self.thinking_config(request)
|
|
47
51
|
|
|
@@ -229,11 +233,24 @@ class AnthropicLikeAdapter(ProviderAdapter):
|
|
|
229
233
|
}
|
|
230
234
|
|
|
231
235
|
def _serialize_message(self, message: ConversationMessage) -> dict[str, Any]:
|
|
236
|
+
role = str(message.get("role") or "user")
|
|
237
|
+
raw_meta = message.get("meta")
|
|
238
|
+
source_provider = raw_meta.get("provider") if isinstance(raw_meta, dict) else None
|
|
239
|
+
content = []
|
|
240
|
+
for block in message.get("content") or []:
|
|
241
|
+
if not isinstance(block, dict):
|
|
242
|
+
continue
|
|
243
|
+
if (
|
|
244
|
+
self.provider_id == "anthropic"
|
|
245
|
+
and role == "assistant"
|
|
246
|
+
and block.get("type") == "thinking"
|
|
247
|
+
and (source_provider != self.provider_id or not get_native_meta(block).get("signature"))
|
|
248
|
+
):
|
|
249
|
+
continue
|
|
250
|
+
content.append(self._serialize_block(block))
|
|
232
251
|
return {
|
|
233
|
-
"role":
|
|
234
|
-
"content":
|
|
235
|
-
self._serialize_block(block) for block in message.get("content") or [] if isinstance(block, dict)
|
|
236
|
-
],
|
|
252
|
+
"role": role,
|
|
253
|
+
"content": content,
|
|
237
254
|
}
|
|
238
255
|
|
|
239
256
|
def _serialize_block(self, block: dict[str, Any]) -> dict[str, Any]:
|
|
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
|