mycode-sdk 0.7.2__tar.gz → 0.7.4__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.7.2 → mycode_sdk-0.7.4}/.gitignore +2 -0
- {mycode_sdk-0.7.2 → mycode_sdk-0.7.4}/PKG-INFO +1 -1
- {mycode_sdk-0.7.2 → mycode_sdk-0.7.4}/pyproject.toml +1 -1
- {mycode_sdk-0.7.2 → mycode_sdk-0.7.4}/src/mycode/models_catalog.json +30 -2
- {mycode_sdk-0.7.2 → mycode_sdk-0.7.4}/src/mycode/providers/base.py +1 -1
- {mycode_sdk-0.7.2 → mycode_sdk-0.7.4}/src/mycode/providers/openai_chat.py +32 -11
- {mycode_sdk-0.7.2 → mycode_sdk-0.7.4}/src/mycode/providers/openai_responses.py +1 -1
- {mycode_sdk-0.7.2 → mycode_sdk-0.7.4}/LICENSE +0 -0
- {mycode_sdk-0.7.2 → mycode_sdk-0.7.4}/README.md +0 -0
- {mycode_sdk-0.7.2 → mycode_sdk-0.7.4}/src/mycode/__init__.py +0 -0
- {mycode_sdk-0.7.2 → mycode_sdk-0.7.4}/src/mycode/agent.py +0 -0
- {mycode_sdk-0.7.2 → mycode_sdk-0.7.4}/src/mycode/hooks.py +0 -0
- {mycode_sdk-0.7.2 → mycode_sdk-0.7.4}/src/mycode/messages.py +0 -0
- {mycode_sdk-0.7.2 → mycode_sdk-0.7.4}/src/mycode/models.py +0 -0
- {mycode_sdk-0.7.2 → mycode_sdk-0.7.4}/src/mycode/providers/__init__.py +0 -0
- {mycode_sdk-0.7.2 → mycode_sdk-0.7.4}/src/mycode/providers/anthropic_like.py +0 -0
- {mycode_sdk-0.7.2 → mycode_sdk-0.7.4}/src/mycode/providers/gemini.py +0 -0
- {mycode_sdk-0.7.2 → mycode_sdk-0.7.4}/src/mycode/py.typed +0 -0
- {mycode_sdk-0.7.2 → mycode_sdk-0.7.4}/src/mycode/session.py +0 -0
- {mycode_sdk-0.7.2 → mycode_sdk-0.7.4}/src/mycode/tools.py +0 -0
- {mycode_sdk-0.7.2 → mycode_sdk-0.7.4}/src/mycode/utils.py +0 -0
|
@@ -789,7 +789,7 @@
|
|
|
789
789
|
},
|
|
790
790
|
"gpt-5.5": {
|
|
791
791
|
"context_window": 1050000,
|
|
792
|
-
"max_output_tokens":
|
|
792
|
+
"max_output_tokens": 128000,
|
|
793
793
|
"supports_image_input": true,
|
|
794
794
|
"supports_pdf_input": true,
|
|
795
795
|
"supports_reasoning": true
|
|
@@ -1181,6 +1181,13 @@
|
|
|
1181
1181
|
"supports_pdf_input": true,
|
|
1182
1182
|
"supports_reasoning": true
|
|
1183
1183
|
},
|
|
1184
|
+
"google/gemini-3.1-flash-image-preview": {
|
|
1185
|
+
"context_window": 65536,
|
|
1186
|
+
"max_output_tokens": 65536,
|
|
1187
|
+
"supports_image_input": true,
|
|
1188
|
+
"supports_pdf_input": false,
|
|
1189
|
+
"supports_reasoning": true
|
|
1190
|
+
},
|
|
1184
1191
|
"google/gemini-3.1-flash-lite-preview": {
|
|
1185
1192
|
"context_window": 1048576,
|
|
1186
1193
|
"max_output_tokens": 65536,
|
|
@@ -1743,7 +1750,7 @@
|
|
|
1743
1750
|
},
|
|
1744
1751
|
"openai/gpt-5.5": {
|
|
1745
1752
|
"context_window": 1050000,
|
|
1746
|
-
"max_output_tokens":
|
|
1753
|
+
"max_output_tokens": 128000,
|
|
1747
1754
|
"supports_image_input": true,
|
|
1748
1755
|
"supports_pdf_input": true,
|
|
1749
1756
|
"supports_reasoning": true
|
|
@@ -1811,6 +1818,13 @@
|
|
|
1811
1818
|
"supports_pdf_input": false,
|
|
1812
1819
|
"supports_reasoning": true
|
|
1813
1820
|
},
|
|
1821
|
+
"openrouter/pareto-code": {
|
|
1822
|
+
"context_window": 200000,
|
|
1823
|
+
"max_output_tokens": 200000,
|
|
1824
|
+
"supports_image_input": false,
|
|
1825
|
+
"supports_pdf_input": false,
|
|
1826
|
+
"supports_reasoning": true
|
|
1827
|
+
},
|
|
1814
1828
|
"prime-intellect/intellect-3": {
|
|
1815
1829
|
"context_window": 131072,
|
|
1816
1830
|
"max_output_tokens": 8192,
|
|
@@ -2056,6 +2070,20 @@
|
|
|
2056
2070
|
"supports_pdf_input": false,
|
|
2057
2071
|
"supports_reasoning": true
|
|
2058
2072
|
},
|
|
2073
|
+
"xiaomi/mimo-v2.5": {
|
|
2074
|
+
"context_window": 1048576,
|
|
2075
|
+
"max_output_tokens": 131072,
|
|
2076
|
+
"supports_image_input": false,
|
|
2077
|
+
"supports_pdf_input": false,
|
|
2078
|
+
"supports_reasoning": true
|
|
2079
|
+
},
|
|
2080
|
+
"xiaomi/mimo-v2.5-pro": {
|
|
2081
|
+
"context_window": 1048576,
|
|
2082
|
+
"max_output_tokens": 131072,
|
|
2083
|
+
"supports_image_input": true,
|
|
2084
|
+
"supports_pdf_input": true,
|
|
2085
|
+
"supports_reasoning": true
|
|
2086
|
+
},
|
|
2059
2087
|
"z-ai/glm-4.5": {
|
|
2060
2088
|
"context_window": 128000,
|
|
2061
2089
|
"max_output_tokens": 96000,
|
|
@@ -205,7 +205,7 @@ def repair_messages_for_replay(
|
|
|
205
205
|
block_type = raw_block.get("type")
|
|
206
206
|
if block_type in {"text", "thinking"}:
|
|
207
207
|
text = str(raw_block.get("text") or "")
|
|
208
|
-
if text:
|
|
208
|
+
if text or get_native_meta(raw_block):
|
|
209
209
|
content.append(dict(raw_block))
|
|
210
210
|
continue
|
|
211
211
|
|
|
@@ -79,9 +79,10 @@ class OpenAIChatAdapter(ProviderAdapter):
|
|
|
79
79
|
|
|
80
80
|
delta = choice.delta
|
|
81
81
|
reasoning_delta, reasoning_meta_update = self._extract_reasoning_delta(delta)
|
|
82
|
+
if reasoning_meta_update:
|
|
83
|
+
thinking_native_meta.update(reasoning_meta_update)
|
|
82
84
|
if reasoning_delta:
|
|
83
85
|
thinking_parts.append(reasoning_delta)
|
|
84
|
-
thinking_native_meta.update(reasoning_meta_update)
|
|
85
86
|
yield ProviderStreamEvent("thinking_delta", {"text": reasoning_delta})
|
|
86
87
|
|
|
87
88
|
if delta.content:
|
|
@@ -104,7 +105,7 @@ class OpenAIChatAdapter(ProviderAdapter):
|
|
|
104
105
|
raise ValueError(str(exc)) from exc
|
|
105
106
|
|
|
106
107
|
blocks = []
|
|
107
|
-
if thinking_parts:
|
|
108
|
+
if thinking_parts or thinking_native_meta:
|
|
108
109
|
blocks.append(
|
|
109
110
|
thinking_block(
|
|
110
111
|
"".join(thinking_parts),
|
|
@@ -286,32 +287,52 @@ class OpenAIChatAdapter(ProviderAdapter):
|
|
|
286
287
|
reasoning_field = str(native_meta.get("reasoning_field") or "")
|
|
287
288
|
if reasoning_field == "reasoning_details":
|
|
288
289
|
return {"reasoning_details": native_meta.get("reasoning_details") or []}
|
|
290
|
+
if reasoning_field == "reasoning":
|
|
291
|
+
return {"reasoning": thinking_text or None}
|
|
292
|
+
if reasoning_field == "reasoning_content":
|
|
293
|
+
return {"reasoning_content": thinking_text or None}
|
|
289
294
|
return {"reasoning_content": thinking_text} if thinking_text else {}
|
|
290
295
|
|
|
291
296
|
def _extract_reasoning_delta(self, delta: Any) -> tuple[str, dict[str, Any]]:
|
|
292
297
|
# Third-party providers surface reasoning through non-standard extras.
|
|
293
298
|
# We check both the delta root and model_extra to cover both patterns.
|
|
294
|
-
# Known fields: reasoning_content
|
|
299
|
+
# Known fields: reasoning, reasoning_content, reasoning_details.
|
|
295
300
|
for source in (delta, getattr(delta, "model_extra", None) or {}):
|
|
296
301
|
if isinstance(source, dict):
|
|
302
|
+
has_reasoning = "reasoning" in source
|
|
303
|
+
reasoning = source.get("reasoning")
|
|
304
|
+
has_reasoning_content = "reasoning_content" in source
|
|
297
305
|
reasoning_content = source.get("reasoning_content")
|
|
306
|
+
has_reasoning_details = "reasoning_details" in source
|
|
298
307
|
reasoning_details = source.get("reasoning_details")
|
|
299
308
|
else:
|
|
309
|
+
has_reasoning = hasattr(source, "reasoning")
|
|
310
|
+
reasoning = getattr(source, "reasoning", None)
|
|
311
|
+
has_reasoning_content = hasattr(source, "reasoning_content")
|
|
300
312
|
reasoning_content = getattr(source, "reasoning_content", None)
|
|
313
|
+
has_reasoning_details = hasattr(source, "reasoning_details")
|
|
301
314
|
reasoning_details = getattr(source, "reasoning_details", None)
|
|
302
315
|
|
|
303
|
-
if
|
|
304
|
-
return
|
|
316
|
+
if has_reasoning:
|
|
317
|
+
return (
|
|
318
|
+
reasoning if isinstance(reasoning, str) else "",
|
|
319
|
+
{"reasoning_field": "reasoning"},
|
|
320
|
+
)
|
|
305
321
|
|
|
306
|
-
if
|
|
322
|
+
if has_reasoning_content:
|
|
323
|
+
return (
|
|
324
|
+
reasoning_content if isinstance(reasoning_content, str) else "",
|
|
325
|
+
{"reasoning_field": "reasoning_content"},
|
|
326
|
+
)
|
|
327
|
+
|
|
328
|
+
if has_reasoning_details and isinstance(reasoning_details, list):
|
|
307
329
|
reasoning_text = "".join(
|
|
308
330
|
str(item.get("text") or "") for item in reasoning_details if isinstance(item, dict)
|
|
309
331
|
)
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
}
|
|
332
|
+
return reasoning_text, {
|
|
333
|
+
"reasoning_field": "reasoning_details",
|
|
334
|
+
"reasoning_details": reasoning_details,
|
|
335
|
+
}
|
|
315
336
|
|
|
316
337
|
return "", {}
|
|
317
338
|
|
|
@@ -30,7 +30,7 @@ class OpenAIResponsesAdapter(ProviderAdapter):
|
|
|
30
30
|
label = "OpenAI Responses"
|
|
31
31
|
default_base_url = "https://api.openai.com/v1"
|
|
32
32
|
env_api_key_names = ("OPENAI_API_KEY",)
|
|
33
|
-
default_models = ("gpt-5.
|
|
33
|
+
default_models = ("gpt-5.5", "gpt-5.4-mini")
|
|
34
34
|
supports_reasoning_effort = True
|
|
35
35
|
|
|
36
36
|
async def stream_turn(self, request: ProviderRequest) -> AsyncIterator[ProviderStreamEvent]:
|
|
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
|