mycode-sdk 0.9.1__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.1 → mycode_sdk-0.9.3}/PKG-INFO +1 -1
- {mycode_sdk-0.9.1 → mycode_sdk-0.9.3}/pyproject.toml +1 -1
- {mycode_sdk-0.9.1 → mycode_sdk-0.9.3}/src/mycode/models_catalog.json +80 -122
- {mycode_sdk-0.9.1 → mycode_sdk-0.9.3}/src/mycode/providers/anthropic_like.py +44 -30
- {mycode_sdk-0.9.1 → mycode_sdk-0.9.3}/src/mycode/providers/openai_chat.py +9 -2
- {mycode_sdk-0.9.1 → mycode_sdk-0.9.3}/.gitignore +0 -0
- {mycode_sdk-0.9.1 → mycode_sdk-0.9.3}/LICENSE +0 -0
- {mycode_sdk-0.9.1 → mycode_sdk-0.9.3}/README.md +0 -0
- {mycode_sdk-0.9.1 → mycode_sdk-0.9.3}/src/mycode/__init__.py +0 -0
- {mycode_sdk-0.9.1 → mycode_sdk-0.9.3}/src/mycode/agent.py +0 -0
- {mycode_sdk-0.9.1 → mycode_sdk-0.9.3}/src/mycode/attachments.py +0 -0
- {mycode_sdk-0.9.1 → mycode_sdk-0.9.3}/src/mycode/compact.py +0 -0
- {mycode_sdk-0.9.1 → mycode_sdk-0.9.3}/src/mycode/hooks.py +0 -0
- {mycode_sdk-0.9.1 → mycode_sdk-0.9.3}/src/mycode/messages.py +0 -0
- {mycode_sdk-0.9.1 → mycode_sdk-0.9.3}/src/mycode/models.py +0 -0
- {mycode_sdk-0.9.1 → mycode_sdk-0.9.3}/src/mycode/providers/__init__.py +0 -0
- {mycode_sdk-0.9.1 → mycode_sdk-0.9.3}/src/mycode/providers/base.py +0 -0
- {mycode_sdk-0.9.1 → mycode_sdk-0.9.3}/src/mycode/providers/gemini.py +0 -0
- {mycode_sdk-0.9.1 → mycode_sdk-0.9.3}/src/mycode/providers/openai_responses.py +0 -0
- {mycode_sdk-0.9.1 → mycode_sdk-0.9.3}/src/mycode/py.typed +0 -0
- {mycode_sdk-0.9.1 → mycode_sdk-0.9.3}/src/mycode/session.py +0 -0
- {mycode_sdk-0.9.1 → mycode_sdk-0.9.3}/src/mycode/tools.py +0 -0
- {mycode_sdk-0.9.1 → mycode_sdk-0.9.3}/src/mycode/utils.py +0 -0
|
@@ -56,6 +56,13 @@
|
|
|
56
56
|
"supports_pdf_input": true,
|
|
57
57
|
"supports_reasoning": false
|
|
58
58
|
},
|
|
59
|
+
"claude-fable-5": {
|
|
60
|
+
"context_window": 1000000,
|
|
61
|
+
"max_output_tokens": 128000,
|
|
62
|
+
"supports_image_input": true,
|
|
63
|
+
"supports_pdf_input": true,
|
|
64
|
+
"supports_reasoning": true
|
|
65
|
+
},
|
|
59
66
|
"claude-haiku-4-5": {
|
|
60
67
|
"context_window": 200000,
|
|
61
68
|
"max_output_tokens": 64000,
|
|
@@ -263,6 +270,13 @@
|
|
|
263
270
|
"supports_pdf_input": true,
|
|
264
271
|
"supports_reasoning": true
|
|
265
272
|
},
|
|
273
|
+
"gemini-3-pro-image-preview": {
|
|
274
|
+
"context_window": 131072,
|
|
275
|
+
"max_output_tokens": 32768,
|
|
276
|
+
"supports_image_input": true,
|
|
277
|
+
"supports_pdf_input": false,
|
|
278
|
+
"supports_reasoning": true
|
|
279
|
+
},
|
|
266
280
|
"gemini-3-pro-preview": {
|
|
267
281
|
"context_window": 1048576,
|
|
268
282
|
"max_output_tokens": 65536,
|
|
@@ -346,6 +360,20 @@
|
|
|
346
360
|
"supports_image_input": true,
|
|
347
361
|
"supports_pdf_input": false,
|
|
348
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
|
|
349
377
|
}
|
|
350
378
|
},
|
|
351
379
|
"minimax": {
|
|
@@ -448,6 +476,20 @@
|
|
|
448
476
|
"supports_image_input": true,
|
|
449
477
|
"supports_pdf_input": false,
|
|
450
478
|
"supports_reasoning": true
|
|
479
|
+
},
|
|
480
|
+
"kimi-k2.7-code": {
|
|
481
|
+
"context_window": 262144,
|
|
482
|
+
"max_output_tokens": 262144,
|
|
483
|
+
"supports_image_input": true,
|
|
484
|
+
"supports_pdf_input": false,
|
|
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
|
|
451
493
|
}
|
|
452
494
|
},
|
|
453
495
|
"openai": {
|
|
@@ -731,20 +773,6 @@
|
|
|
731
773
|
"supports_pdf_input": true,
|
|
732
774
|
"supports_reasoning": true
|
|
733
775
|
},
|
|
734
|
-
"o1-mini": {
|
|
735
|
-
"context_window": 128000,
|
|
736
|
-
"max_output_tokens": 65536,
|
|
737
|
-
"supports_image_input": false,
|
|
738
|
-
"supports_pdf_input": false,
|
|
739
|
-
"supports_reasoning": true
|
|
740
|
-
},
|
|
741
|
-
"o1-preview": {
|
|
742
|
-
"context_window": 128000,
|
|
743
|
-
"max_output_tokens": 32768,
|
|
744
|
-
"supports_image_input": false,
|
|
745
|
-
"supports_pdf_input": false,
|
|
746
|
-
"supports_reasoning": true
|
|
747
|
-
},
|
|
748
776
|
"o1-pro": {
|
|
749
777
|
"context_window": 200000,
|
|
750
778
|
"max_output_tokens": 100000,
|
|
@@ -1013,20 +1041,6 @@
|
|
|
1013
1041
|
"supports_pdf_input": false,
|
|
1014
1042
|
"supports_reasoning": false
|
|
1015
1043
|
},
|
|
1016
|
-
"arcee-ai/maestro-reasoning": {
|
|
1017
|
-
"context_window": 131072,
|
|
1018
|
-
"max_output_tokens": 32000,
|
|
1019
|
-
"supports_image_input": false,
|
|
1020
|
-
"supports_pdf_input": false,
|
|
1021
|
-
"supports_reasoning": false
|
|
1022
|
-
},
|
|
1023
|
-
"arcee-ai/spotlight": {
|
|
1024
|
-
"context_window": 131072,
|
|
1025
|
-
"max_output_tokens": 65537,
|
|
1026
|
-
"supports_image_input": true,
|
|
1027
|
-
"supports_pdf_input": false,
|
|
1028
|
-
"supports_reasoning": false
|
|
1029
|
-
},
|
|
1030
1044
|
"arcee-ai/trinity-large-thinking": {
|
|
1031
1045
|
"context_window": 262144,
|
|
1032
1046
|
"max_output_tokens": 262144,
|
|
@@ -1048,13 +1062,6 @@
|
|
|
1048
1062
|
"supports_pdf_input": false,
|
|
1049
1063
|
"supports_reasoning": false
|
|
1050
1064
|
},
|
|
1051
|
-
"baidu/ernie-4.5-vl-28b-a3b": {
|
|
1052
|
-
"context_window": 30000,
|
|
1053
|
-
"max_output_tokens": 8000,
|
|
1054
|
-
"supports_image_input": true,
|
|
1055
|
-
"supports_pdf_input": false,
|
|
1056
|
-
"supports_reasoning": true
|
|
1057
|
-
},
|
|
1058
1065
|
"baidu/ernie-4.5-vl-424b-a47b": {
|
|
1059
1066
|
"context_window": 123000,
|
|
1060
1067
|
"max_output_tokens": 16000,
|
|
@@ -1175,15 +1182,8 @@
|
|
|
1175
1182
|
"supports_reasoning": true
|
|
1176
1183
|
},
|
|
1177
1184
|
"deepseek/deepseek-r1-distill-llama-70b": {
|
|
1178
|
-
"context_window":
|
|
1179
|
-
"max_output_tokens":
|
|
1180
|
-
"supports_image_input": false,
|
|
1181
|
-
"supports_pdf_input": false,
|
|
1182
|
-
"supports_reasoning": true
|
|
1183
|
-
},
|
|
1184
|
-
"deepseek/deepseek-r1-distill-qwen-32b": {
|
|
1185
|
-
"context_window": 32768,
|
|
1186
|
-
"max_output_tokens": 32768,
|
|
1185
|
+
"context_window": 8192,
|
|
1186
|
+
"max_output_tokens": 8192,
|
|
1187
1187
|
"supports_image_input": false,
|
|
1188
1188
|
"supports_pdf_input": false,
|
|
1189
1189
|
"supports_reasoning": true
|
|
@@ -1210,8 +1210,8 @@
|
|
|
1210
1210
|
"supports_reasoning": true
|
|
1211
1211
|
},
|
|
1212
1212
|
"deepseek/deepseek-v4-flash": {
|
|
1213
|
-
"context_window":
|
|
1214
|
-
"max_output_tokens":
|
|
1213
|
+
"context_window": 1048575,
|
|
1214
|
+
"max_output_tokens": 65536,
|
|
1215
1215
|
"supports_image_input": false,
|
|
1216
1216
|
"supports_pdf_input": false,
|
|
1217
1217
|
"supports_reasoning": true
|
|
@@ -1386,7 +1386,7 @@
|
|
|
1386
1386
|
},
|
|
1387
1387
|
"google/gemma-4-31b-it": {
|
|
1388
1388
|
"context_window": 262144,
|
|
1389
|
-
"max_output_tokens":
|
|
1389
|
+
"max_output_tokens": 262144,
|
|
1390
1390
|
"supports_image_input": true,
|
|
1391
1391
|
"supports_pdf_input": false,
|
|
1392
1392
|
"supports_reasoning": true
|
|
@@ -1532,7 +1532,7 @@
|
|
|
1532
1532
|
"supports_reasoning": false
|
|
1533
1533
|
},
|
|
1534
1534
|
"meta-llama/llama-3.1-8b-instruct": {
|
|
1535
|
-
"context_window":
|
|
1535
|
+
"context_window": 131072,
|
|
1536
1536
|
"max_output_tokens": 16384,
|
|
1537
1537
|
"supports_image_input": false,
|
|
1538
1538
|
"supports_pdf_input": false,
|
|
@@ -1594,13 +1594,6 @@
|
|
|
1594
1594
|
"supports_pdf_input": false,
|
|
1595
1595
|
"supports_reasoning": false
|
|
1596
1596
|
},
|
|
1597
|
-
"meta-llama/llama-guard-3-8b": {
|
|
1598
|
-
"context_window": 131072,
|
|
1599
|
-
"max_output_tokens": 131072,
|
|
1600
|
-
"supports_image_input": false,
|
|
1601
|
-
"supports_pdf_input": false,
|
|
1602
|
-
"supports_reasoning": false
|
|
1603
|
-
},
|
|
1604
1597
|
"meta-llama/llama-guard-4-12b": {
|
|
1605
1598
|
"context_window": 163840,
|
|
1606
1599
|
"max_output_tokens": 16384,
|
|
@@ -1840,20 +1833,20 @@
|
|
|
1840
1833
|
"supports_reasoning": true
|
|
1841
1834
|
},
|
|
1842
1835
|
"moonshotai/kimi-k2.5": {
|
|
1843
|
-
"context_window":
|
|
1836
|
+
"context_window": 256000,
|
|
1844
1837
|
"max_output_tokens": 262144,
|
|
1845
1838
|
"supports_image_input": true,
|
|
1846
1839
|
"supports_pdf_input": false,
|
|
1847
1840
|
"supports_reasoning": true
|
|
1848
1841
|
},
|
|
1849
1842
|
"moonshotai/kimi-k2.6": {
|
|
1850
|
-
"context_window":
|
|
1851
|
-
"max_output_tokens":
|
|
1843
|
+
"context_window": 262142,
|
|
1844
|
+
"max_output_tokens": 262142,
|
|
1852
1845
|
"supports_image_input": true,
|
|
1853
1846
|
"supports_pdf_input": false,
|
|
1854
1847
|
"supports_reasoning": true
|
|
1855
1848
|
},
|
|
1856
|
-
"moonshotai/kimi-k2.
|
|
1849
|
+
"moonshotai/kimi-k2.7-code": {
|
|
1857
1850
|
"context_window": 262144,
|
|
1858
1851
|
"max_output_tokens": 262144,
|
|
1859
1852
|
"supports_image_input": true,
|
|
@@ -1874,19 +1867,12 @@
|
|
|
1874
1867
|
"supports_pdf_input": false,
|
|
1875
1868
|
"supports_reasoning": false
|
|
1876
1869
|
},
|
|
1877
|
-
"nex-agi/
|
|
1878
|
-
"context_window":
|
|
1879
|
-
"max_output_tokens":
|
|
1880
|
-
"supports_image_input":
|
|
1881
|
-
"supports_pdf_input": false,
|
|
1882
|
-
"supports_reasoning": false
|
|
1883
|
-
},
|
|
1884
|
-
"nousresearch/hermes-2-pro-llama-3-8b": {
|
|
1885
|
-
"context_window": 8192,
|
|
1886
|
-
"max_output_tokens": 8192,
|
|
1887
|
-
"supports_image_input": false,
|
|
1870
|
+
"nex-agi/nex-n2-pro:free": {
|
|
1871
|
+
"context_window": 262144,
|
|
1872
|
+
"max_output_tokens": 262144,
|
|
1873
|
+
"supports_image_input": true,
|
|
1888
1874
|
"supports_pdf_input": false,
|
|
1889
|
-
"supports_reasoning":
|
|
1875
|
+
"supports_reasoning": true
|
|
1890
1876
|
},
|
|
1891
1877
|
"nousresearch/hermes-3-llama-3.1-405b": {
|
|
1892
1878
|
"context_window": 131072,
|
|
@@ -1993,13 +1979,6 @@
|
|
|
1993
1979
|
"supports_pdf_input": false,
|
|
1994
1980
|
"supports_reasoning": true
|
|
1995
1981
|
},
|
|
1996
|
-
"nvidia/nemotron-nano-9b-v2": {
|
|
1997
|
-
"context_window": 131072,
|
|
1998
|
-
"max_output_tokens": 16384,
|
|
1999
|
-
"supports_image_input": false,
|
|
2000
|
-
"supports_pdf_input": false,
|
|
2001
|
-
"supports_reasoning": true
|
|
2002
|
-
},
|
|
2003
1982
|
"nvidia/nemotron-nano-9b-v2:free": {
|
|
2004
1983
|
"context_window": 128000,
|
|
2005
1984
|
"max_output_tokens": 128000,
|
|
@@ -2042,13 +2021,6 @@
|
|
|
2042
2021
|
"supports_pdf_input": false,
|
|
2043
2022
|
"supports_reasoning": false
|
|
2044
2023
|
},
|
|
2045
|
-
"openai/gpt-4-1106-preview": {
|
|
2046
|
-
"context_window": 128000,
|
|
2047
|
-
"max_output_tokens": 4096,
|
|
2048
|
-
"supports_image_input": false,
|
|
2049
|
-
"supports_pdf_input": false,
|
|
2050
|
-
"supports_reasoning": false
|
|
2051
|
-
},
|
|
2052
2024
|
"openai/gpt-4-turbo": {
|
|
2053
2025
|
"context_window": 128000,
|
|
2054
2026
|
"max_output_tokens": 4096,
|
|
@@ -2470,7 +2442,7 @@
|
|
|
2470
2442
|
"supports_reasoning": true
|
|
2471
2443
|
},
|
|
2472
2444
|
"openrouter/fusion": {
|
|
2473
|
-
"context_window":
|
|
2445
|
+
"context_window": 1000000,
|
|
2474
2446
|
"max_output_tokens": 128000,
|
|
2475
2447
|
"supports_image_input": false,
|
|
2476
2448
|
"supports_pdf_input": false,
|
|
@@ -2596,8 +2568,8 @@
|
|
|
2596
2568
|
"supports_reasoning": true
|
|
2597
2569
|
},
|
|
2598
2570
|
"qwen/qwen2.5-vl-72b-instruct": {
|
|
2599
|
-
"context_window":
|
|
2600
|
-
"max_output_tokens":
|
|
2571
|
+
"context_window": 128000,
|
|
2572
|
+
"max_output_tokens": 128000,
|
|
2601
2573
|
"supports_image_input": true,
|
|
2602
2574
|
"supports_pdf_input": false,
|
|
2603
2575
|
"supports_reasoning": false
|
|
@@ -2632,7 +2604,7 @@
|
|
|
2632
2604
|
},
|
|
2633
2605
|
"qwen/qwen3-30b-a3b": {
|
|
2634
2606
|
"context_window": 40960,
|
|
2635
|
-
"max_output_tokens":
|
|
2607
|
+
"max_output_tokens": 16384,
|
|
2636
2608
|
"supports_image_input": false,
|
|
2637
2609
|
"supports_pdf_input": false,
|
|
2638
2610
|
"supports_reasoning": true
|
|
@@ -2807,13 +2779,13 @@
|
|
|
2807
2779
|
},
|
|
2808
2780
|
"qwen/qwen3.5-35b-a3b": {
|
|
2809
2781
|
"context_window": 262144,
|
|
2810
|
-
"max_output_tokens":
|
|
2782
|
+
"max_output_tokens": 81920,
|
|
2811
2783
|
"supports_image_input": true,
|
|
2812
2784
|
"supports_pdf_input": false,
|
|
2813
2785
|
"supports_reasoning": true
|
|
2814
2786
|
},
|
|
2815
2787
|
"qwen/qwen3.5-397b-a17b": {
|
|
2816
|
-
"context_window":
|
|
2788
|
+
"context_window": 131072,
|
|
2817
2789
|
"max_output_tokens": 65536,
|
|
2818
2790
|
"supports_image_input": true,
|
|
2819
2791
|
"supports_pdf_input": false,
|
|
@@ -2821,7 +2793,7 @@
|
|
|
2821
2793
|
},
|
|
2822
2794
|
"qwen/qwen3.5-9b": {
|
|
2823
2795
|
"context_window": 262144,
|
|
2824
|
-
"max_output_tokens":
|
|
2796
|
+
"max_output_tokens": 262144,
|
|
2825
2797
|
"supports_image_input": true,
|
|
2826
2798
|
"supports_pdf_input": false,
|
|
2827
2799
|
"supports_reasoning": true
|
|
@@ -2855,8 +2827,8 @@
|
|
|
2855
2827
|
"supports_reasoning": true
|
|
2856
2828
|
},
|
|
2857
2829
|
"qwen/qwen3.6-35b-a3b": {
|
|
2858
|
-
"context_window":
|
|
2859
|
-
"max_output_tokens":
|
|
2830
|
+
"context_window": 262144,
|
|
2831
|
+
"max_output_tokens": 262144,
|
|
2860
2832
|
"supports_image_input": true,
|
|
2861
2833
|
"supports_pdf_input": false,
|
|
2862
2834
|
"supports_reasoning": true
|
|
@@ -2924,13 +2896,6 @@
|
|
|
2924
2896
|
"supports_pdf_input": false,
|
|
2925
2897
|
"supports_reasoning": false
|
|
2926
2898
|
},
|
|
2927
|
-
"sao10k/l3-euryale-70b": {
|
|
2928
|
-
"context_window": 8192,
|
|
2929
|
-
"max_output_tokens": 8192,
|
|
2930
|
-
"supports_image_input": false,
|
|
2931
|
-
"supports_pdf_input": false,
|
|
2932
|
-
"supports_reasoning": false
|
|
2933
|
-
},
|
|
2934
2899
|
"sao10k/l3-lunaris-8b": {
|
|
2935
2900
|
"context_window": 8192,
|
|
2936
2901
|
"max_output_tokens": 16384,
|
|
@@ -3092,13 +3057,6 @@
|
|
|
3092
3057
|
"supports_pdf_input": false,
|
|
3093
3058
|
"supports_reasoning": true
|
|
3094
3059
|
},
|
|
3095
|
-
"z-ai/glm-4-32b": {
|
|
3096
|
-
"context_window": 128000,
|
|
3097
|
-
"max_output_tokens": 128000,
|
|
3098
|
-
"supports_image_input": false,
|
|
3099
|
-
"supports_pdf_input": false,
|
|
3100
|
-
"supports_reasoning": false
|
|
3101
|
-
},
|
|
3102
3060
|
"z-ai/glm-4.5": {
|
|
3103
3061
|
"context_window": 131072,
|
|
3104
3062
|
"max_output_tokens": 98304,
|
|
@@ -3113,13 +3071,6 @@
|
|
|
3113
3071
|
"supports_pdf_input": false,
|
|
3114
3072
|
"supports_reasoning": true
|
|
3115
3073
|
},
|
|
3116
|
-
"z-ai/glm-4.5-air:free": {
|
|
3117
|
-
"context_window": 131072,
|
|
3118
|
-
"max_output_tokens": 96000,
|
|
3119
|
-
"supports_image_input": false,
|
|
3120
|
-
"supports_pdf_input": false,
|
|
3121
|
-
"supports_reasoning": true
|
|
3122
|
-
},
|
|
3123
3074
|
"z-ai/glm-4.5v": {
|
|
3124
3075
|
"context_window": 65536,
|
|
3125
3076
|
"max_output_tokens": 16384,
|
|
@@ -3136,7 +3087,7 @@
|
|
|
3136
3087
|
},
|
|
3137
3088
|
"z-ai/glm-4.6v": {
|
|
3138
3089
|
"context_window": 131072,
|
|
3139
|
-
"max_output_tokens":
|
|
3090
|
+
"max_output_tokens": 32768,
|
|
3140
3091
|
"supports_image_input": true,
|
|
3141
3092
|
"supports_pdf_input": false,
|
|
3142
3093
|
"supports_reasoning": true
|
|
@@ -3163,7 +3114,7 @@
|
|
|
3163
3114
|
"supports_reasoning": true
|
|
3164
3115
|
},
|
|
3165
3116
|
"z-ai/glm-5-turbo": {
|
|
3166
|
-
"context_window":
|
|
3117
|
+
"context_window": 262144,
|
|
3167
3118
|
"max_output_tokens": 131072,
|
|
3168
3119
|
"supports_image_input": false,
|
|
3169
3120
|
"supports_pdf_input": false,
|
|
@@ -3176,13 +3127,20 @@
|
|
|
3176
3127
|
"supports_pdf_input": false,
|
|
3177
3128
|
"supports_reasoning": true
|
|
3178
3129
|
},
|
|
3179
|
-
"z-ai/glm-
|
|
3180
|
-
"context_window":
|
|
3130
|
+
"z-ai/glm-5.2": {
|
|
3131
|
+
"context_window": 1048576,
|
|
3181
3132
|
"max_output_tokens": 131072,
|
|
3182
|
-
"supports_image_input":
|
|
3133
|
+
"supports_image_input": false,
|
|
3183
3134
|
"supports_pdf_input": false,
|
|
3184
3135
|
"supports_reasoning": true
|
|
3185
3136
|
},
|
|
3137
|
+
"~anthropic/claude-fable-latest": {
|
|
3138
|
+
"context_window": 1000000,
|
|
3139
|
+
"max_output_tokens": 128000,
|
|
3140
|
+
"supports_image_input": true,
|
|
3141
|
+
"supports_pdf_input": true,
|
|
3142
|
+
"supports_reasoning": true
|
|
3143
|
+
},
|
|
3186
3144
|
"~anthropic/claude-haiku-latest": {
|
|
3187
3145
|
"context_window": 200000,
|
|
3188
3146
|
"max_output_tokens": 64000,
|
|
@@ -3219,8 +3177,8 @@
|
|
|
3219
3177
|
"supports_reasoning": true
|
|
3220
3178
|
},
|
|
3221
3179
|
"~moonshotai/kimi-latest": {
|
|
3222
|
-
"context_window":
|
|
3223
|
-
"max_output_tokens":
|
|
3180
|
+
"context_window": 262142,
|
|
3181
|
+
"max_output_tokens": 262142,
|
|
3224
3182
|
"supports_image_input": true,
|
|
3225
3183
|
"supports_pdf_input": false,
|
|
3226
3184
|
"supports_reasoning": true
|
|
@@ -28,9 +28,6 @@ from mycode.providers.base import (
|
|
|
28
28
|
tool_result_content_blocks,
|
|
29
29
|
)
|
|
30
30
|
|
|
31
|
-
# Maps reasoning_effort values to extended thinking budget_tokens.
|
|
32
|
-
_THINKING_BUDGETS: dict[str, int] = {"low": 2048, "medium": 8192, "high": 24576, "xhigh": 32768}
|
|
33
|
-
|
|
34
31
|
|
|
35
32
|
class AnthropicLikeAdapter(ProviderAdapter):
|
|
36
33
|
"""Shared Messages adapter for Anthropic-compatible providers."""
|
|
@@ -43,25 +40,21 @@ class AnthropicLikeAdapter(ProviderAdapter):
|
|
|
43
40
|
del request
|
|
44
41
|
return None
|
|
45
42
|
|
|
46
|
-
def manual_thinking_config(self, effort: str | None) -> dict[str, Any] | None:
|
|
47
|
-
if not effort:
|
|
48
|
-
return None
|
|
49
|
-
if effort == "none":
|
|
50
|
-
return {"type": "disabled"}
|
|
51
|
-
budget = _THINKING_BUDGETS.get(effort)
|
|
52
|
-
return {"type": "enabled", "budget_tokens": budget} if budget else None
|
|
53
|
-
|
|
54
43
|
def _build_request_payload(self, request: ProviderRequest) -> dict[str, Any]:
|
|
55
|
-
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)
|
|
56
49
|
self._apply_cache_control(messages)
|
|
57
50
|
thinking = self.thinking_config(request)
|
|
58
51
|
|
|
59
52
|
payload: dict[str, Any] = {
|
|
60
53
|
"model": request.model,
|
|
61
54
|
"max_tokens": request.max_tokens,
|
|
62
|
-
"temperature": request.temperature,
|
|
63
55
|
"messages": messages,
|
|
64
56
|
}
|
|
57
|
+
# Anthropic-compatible providers use provider-default sampling; temperature is intentionally omitted.
|
|
65
58
|
if request.system:
|
|
66
59
|
payload["system"] = [
|
|
67
60
|
{
|
|
@@ -240,11 +233,24 @@ class AnthropicLikeAdapter(ProviderAdapter):
|
|
|
240
233
|
}
|
|
241
234
|
|
|
242
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))
|
|
243
251
|
return {
|
|
244
|
-
"role":
|
|
245
|
-
"content":
|
|
246
|
-
self._serialize_block(block) for block in message.get("content") or [] if isinstance(block, dict)
|
|
247
|
-
],
|
|
252
|
+
"role": role,
|
|
253
|
+
"content": content,
|
|
248
254
|
}
|
|
249
255
|
|
|
250
256
|
def _serialize_block(self, block: dict[str, Any]) -> dict[str, Any]:
|
|
@@ -315,7 +321,7 @@ class AnthropicAdapter(AnthropicLikeAdapter):
|
|
|
315
321
|
label = "Anthropic"
|
|
316
322
|
default_base_url = "https://api.anthropic.com"
|
|
317
323
|
env_api_key_names = ("ANTHROPIC_API_KEY",)
|
|
318
|
-
default_models = ("claude-sonnet-4-6", "claude-opus-4-
|
|
324
|
+
default_models = ("claude-sonnet-4-6", "claude-opus-4-8")
|
|
319
325
|
supports_reasoning_effort = True
|
|
320
326
|
|
|
321
327
|
@override
|
|
@@ -326,12 +332,10 @@ class AnthropicAdapter(AnthropicLikeAdapter):
|
|
|
326
332
|
if effort == "none":
|
|
327
333
|
return {"type": "disabled"}
|
|
328
334
|
normalized = request.model.lower()
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
return thinking
|
|
334
|
-
return self.manual_thinking_config(effort)
|
|
335
|
+
thinking: dict[str, Any] = {"type": "adaptive"}
|
|
336
|
+
if normalized.startswith(("claude-opus-4-7", "claude-opus-4-8")):
|
|
337
|
+
thinking["display"] = "summarized"
|
|
338
|
+
return thinking
|
|
335
339
|
|
|
336
340
|
@override
|
|
337
341
|
def output_config(self, request: ProviderRequest) -> dict[str, Any] | None:
|
|
@@ -340,7 +344,7 @@ class AnthropicAdapter(AnthropicLikeAdapter):
|
|
|
340
344
|
return None
|
|
341
345
|
|
|
342
346
|
normalized = request.model.lower()
|
|
343
|
-
if normalized.startswith("claude-opus-4-7"):
|
|
347
|
+
if normalized.startswith(("claude-opus-4-7", "claude-opus-4-8")):
|
|
344
348
|
return {"effort": effort}
|
|
345
349
|
|
|
346
350
|
if normalized.startswith("claude-sonnet-4-6"):
|
|
@@ -365,12 +369,22 @@ class MoonshotAIAdapter(AnthropicLikeAdapter):
|
|
|
365
369
|
label = "Moonshot"
|
|
366
370
|
default_base_url = "https://api.moonshot.ai/anthropic"
|
|
367
371
|
env_api_key_names = ("MOONSHOT_API_KEY",)
|
|
368
|
-
default_models = ("kimi-k2.6"
|
|
372
|
+
default_models = ("kimi-k2.7-code", "kimi-k2.6")
|
|
369
373
|
supports_reasoning_effort = True
|
|
370
374
|
|
|
371
375
|
@override
|
|
372
376
|
def thinking_config(self, request: ProviderRequest) -> dict[str, Any] | None:
|
|
373
|
-
|
|
377
|
+
if not request.reasoning_effort:
|
|
378
|
+
return None
|
|
379
|
+
if request.reasoning_effort == "none" and request.model.lower() != "kimi-k2.7-code":
|
|
380
|
+
return {"type": "disabled"}
|
|
381
|
+
return {"type": "adaptive"}
|
|
382
|
+
|
|
383
|
+
@override
|
|
384
|
+
def output_config(self, request: ProviderRequest) -> dict[str, Any] | None:
|
|
385
|
+
if not request.reasoning_effort or request.reasoning_effort == "none":
|
|
386
|
+
return None
|
|
387
|
+
return {"effort": request.reasoning_effort}
|
|
374
388
|
|
|
375
389
|
|
|
376
390
|
class MiniMaxAdapter(AnthropicLikeAdapter):
|
|
@@ -385,9 +399,9 @@ class MiniMaxAdapter(AnthropicLikeAdapter):
|
|
|
385
399
|
label = "MiniMax"
|
|
386
400
|
default_base_url = "https://api.minimax.io/anthropic"
|
|
387
401
|
env_api_key_names = ("MINIMAX_API_KEY",)
|
|
388
|
-
default_models = ("MiniMax-
|
|
389
|
-
supports_reasoning_effort =
|
|
402
|
+
default_models = ("MiniMax-M3",)
|
|
403
|
+
supports_reasoning_effort = False
|
|
390
404
|
|
|
391
405
|
@override
|
|
392
406
|
def thinking_config(self, request: ProviderRequest) -> dict[str, Any] | None:
|
|
393
|
-
return
|
|
407
|
+
return {"type": "adaptive"}
|
|
@@ -366,12 +366,19 @@ class ZAIAdapter(OpenAIChatAdapter):
|
|
|
366
366
|
label = "Z.AI"
|
|
367
367
|
default_base_url = "https://api.z.ai/api/paas/v4/"
|
|
368
368
|
env_api_key_names = ("ZAI_API_KEY",)
|
|
369
|
-
default_models = ("glm-5.
|
|
369
|
+
default_models = ("glm-5.2",)
|
|
370
370
|
auto_discoverable = True
|
|
371
|
+
supports_reasoning_effort = True
|
|
371
372
|
|
|
372
373
|
@override
|
|
373
374
|
def _build_provider_payload_overrides(self, request: ProviderRequest) -> dict[str, Any]:
|
|
374
|
-
|
|
375
|
+
payload: dict[str, Any] = {"extra_body": {"thinking": {"type": "enabled", "clear_thinking": False}}}
|
|
376
|
+
if request.model.lower().startswith("glm-5.2"):
|
|
377
|
+
if request.reasoning_effort in {"low", "medium", "high"}:
|
|
378
|
+
payload["reasoning_effort"] = "high"
|
|
379
|
+
elif request.reasoning_effort == "xhigh":
|
|
380
|
+
payload["reasoning_effort"] = "max"
|
|
381
|
+
return payload
|
|
375
382
|
|
|
376
383
|
|
|
377
384
|
class OpenRouterAdapter(OpenAIChatAdapter):
|
|
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
|