agenthub-python 0.4.3__py3-none-any.whl → 0.4.4__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.
@@ -75,6 +75,7 @@ class AntMessagesClient(LLMClient):
75
75
  ThinkingLevel.MEDIUM: {"thinking": {"type": "adaptive"}, "output_config": {"effort": "medium"}},
76
76
  ThinkingLevel.HIGH: {"thinking": {"type": "adaptive"}, "output_config": {"effort": "high"}},
77
77
  ThinkingLevel.XHIGH: {"thinking": {"type": "adaptive"}, "output_config": {"effort": "xhigh"}},
78
+ ThinkingLevel.MAX: {"thinking": {"type": "adaptive"}, "output_config": {"effort": "max"}},
78
79
  }
79
80
  return mapping.get(thinking_level)
80
81
 
@@ -115,6 +115,8 @@ class Claude5Client(LLMClient):
115
115
  "thinking": {"type": "adaptive"},
116
116
  "output_config": {"effort": "high" if "4-6" in self._model else "xhigh"},
117
117
  },
118
+ # every model this client serves is 4.6 or later, and max spans that whole range
119
+ ThinkingLevel.MAX: {"thinking": {"type": "adaptive"}, "output_config": {"effort": "max"}},
118
120
  }
119
121
  return mapping.get(thinking_level)
120
122
 
@@ -54,17 +54,24 @@ class DeepSeekV4Client(LLMClient):
54
54
  ThinkingLevel.MEDIUM: {"type": "enabled"},
55
55
  ThinkingLevel.HIGH: {"type": "enabled"},
56
56
  ThinkingLevel.XHIGH: {"type": "enabled"},
57
+ ThinkingLevel.MAX: {"type": "enabled"},
57
58
  }
58
59
  return mapping[thinking_level]
59
60
 
60
61
  def _convert_reasoning_effort(self, thinking_level: ThinkingLevel) -> str | None:
61
- """Convert ThinkingLevel enum to DeepSeek's reasoning_effort."""
62
+ """Convert ThinkingLevel enum to DeepSeek's reasoning_effort.
63
+
64
+ DeepSeek accepts low/high/max and maps medium and xhigh onto high server-side
65
+ (llmsdk_docs/deepseek_v4/docs/thinking-mode.md), so this sends the value the
66
+ server would settle on anyway.
67
+ """
62
68
  mapping = {
63
69
  ThinkingLevel.NONE: None,
64
- ThinkingLevel.LOW: "high",
70
+ ThinkingLevel.LOW: "low",
65
71
  ThinkingLevel.MEDIUM: "high",
66
72
  ThinkingLevel.HIGH: "high",
67
- ThinkingLevel.XHIGH: "max",
73
+ ThinkingLevel.XHIGH: "high",
74
+ ThinkingLevel.MAX: "max",
68
75
  }
69
76
  return mapping[thinking_level]
70
77
 
@@ -142,6 +142,8 @@ class Gemini3_7Client(LLMClient):
142
142
  ThinkingLevel.MEDIUM: types.ThinkingLevel.MEDIUM,
143
143
  ThinkingLevel.HIGH: types.ThinkingLevel.HIGH,
144
144
  ThinkingLevel.XHIGH: types.ThinkingLevel.HIGH,
145
+ # Gemini stops at "high", so both top levels land there before per-model clamping
146
+ ThinkingLevel.MAX: types.ThinkingLevel.HIGH,
145
147
  }
146
148
  level = mapping.get(thinking_level)
147
149
  if level is None:
@@ -201,6 +203,8 @@ class Gemini3_7Client(LLMClient):
201
203
  "sampling parameters starting with the 3.6 generation.",
202
204
  )
203
205
 
206
+ # include_thoughts asks for thought summaries, but whether generateContent returns any
207
+ # is model-dependent (llmsdk_docs/gemini3_7/docs/thinking.md)
204
208
  thinking_summary = config.get("thinking_summary")
205
209
  thinking_level = config.get("thinking_level")
206
210
  if thinking_summary is not None or thinking_level is not None:
@@ -376,11 +380,6 @@ class Gemini3_7Client(LLMClient):
376
380
  usage_metadata: UsageMetadata | None = None
377
381
  finish_reason: FinishReason | None = None
378
382
 
379
- if not model_output.candidates and not model_output.usage_metadata:
380
- # gateways inject heartbeat chunks on long generations; they map to a chunk with
381
- # neither candidates nor usage, so there is nothing to emit
382
- event_type = "unused"
383
-
384
383
  if model_output.candidates:
385
384
  candidate = model_output.candidates[0]
386
385
  content = getattr(candidate, "content", None)
@@ -441,6 +440,11 @@ class Gemini3_7Client(LLMClient):
441
440
  "response_tokens": model_output.usage_metadata.candidates_token_count,
442
441
  }
443
442
 
443
+ if not content_items and usage_metadata is None and finish_reason is None:
444
+ # nothing was read out of the chunk, so there is nothing to emit: a gateway
445
+ # heartbeat looks like this, and so does any other chunk we take no value from
446
+ event_type = "unused"
447
+
444
448
  return {
445
449
  "role": "assistant",
446
450
  "event_type": event_type,
agenthub/glm5_3/client.py CHANGED
@@ -81,6 +81,7 @@ class GLM5_3Client(LLMClient):
81
81
  ThinkingLevel.MEDIUM: "high",
82
82
  ThinkingLevel.HIGH: "high",
83
83
  ThinkingLevel.XHIGH: "max",
84
+ ThinkingLevel.MAX: "max",
84
85
  }
85
86
  return mapping.get(thinking_level)
86
87
  if "glm-5.2" in model:
@@ -90,6 +91,7 @@ class GLM5_3Client(LLMClient):
90
91
  ThinkingLevel.MEDIUM: "medium",
91
92
  ThinkingLevel.HIGH: "high",
92
93
  ThinkingLevel.XHIGH: "xhigh",
94
+ ThinkingLevel.MAX: "max",
93
95
  }
94
96
  return mapping.get(thinking_level)
95
97
  return None
agenthub/gpt5_6/client.py CHANGED
@@ -54,6 +54,7 @@ class GPT5_6Client(LLMClient):
54
54
  ThinkingLevel.MEDIUM: "medium",
55
55
  ThinkingLevel.HIGH: "high",
56
56
  ThinkingLevel.XHIGH: "xhigh",
57
+ ThinkingLevel.MAX: "max",
57
58
  }
58
59
  return mapping.get(thinking_level)
59
60
 
@@ -286,7 +286,8 @@ def create_chat_app() -> Flask:
286
286
  <button type="button" role="option" aria-selected="false" class="w-full px-3 py-2 text-left hover:bg-gray-50 focus:bg-gray-50 focus:outline-none" data-combobox-option data-value="low" data-label="Low" data-description="Low thinking budget" onclick="selectComboboxOption('thinkingLevelCombobox', this)">Low</button>
287
287
  <button type="button" role="option" aria-selected="false" class="w-full px-3 py-2 text-left hover:bg-gray-50 focus:bg-gray-50 focus:outline-none" data-combobox-option data-value="medium" data-label="Medium" data-description="Medium thinking budget" onclick="selectComboboxOption('thinkingLevelCombobox', this)">Medium</button>
288
288
  <button type="button" role="option" aria-selected="false" class="w-full px-3 py-2 text-left hover:bg-gray-50 focus:bg-gray-50 focus:outline-none" data-combobox-option data-value="high" data-label="High" data-description="High thinking budget" onclick="selectComboboxOption('thinkingLevelCombobox', this)">High</button>
289
- <button type="button" role="option" aria-selected="false" class="w-full px-3 py-2 text-left hover:bg-gray-50 focus:bg-gray-50 focus:outline-none" data-combobox-option data-value="xhigh" data-label="XHigh" data-description="Maximum thinking budget" onclick="selectComboboxOption('thinkingLevelCombobox', this)">XHigh</button>
289
+ <button type="button" role="option" aria-selected="false" class="w-full px-3 py-2 text-left hover:bg-gray-50 focus:bg-gray-50 focus:outline-none" data-combobox-option data-value="xhigh" data-label="XHigh" data-description="Extended thinking budget" onclick="selectComboboxOption('thinkingLevelCombobox', this)">XHigh</button>
290
+ <button type="button" role="option" aria-selected="false" class="w-full px-3 py-2 text-left hover:bg-gray-50 focus:bg-gray-50 focus:outline-none" data-combobox-option data-value="max" data-label="Max" data-description="Maximum thinking budget" onclick="selectComboboxOption('thinkingLevelCombobox', this)">Max</button>
290
291
  </div>
291
292
  </div>
292
293
  </div>
@@ -78,6 +78,7 @@ class KimiK3Client(LLMClient):
78
78
  ThinkingLevel.MEDIUM: {"type": "enabled", "keep": "all"},
79
79
  ThinkingLevel.HIGH: {"type": "enabled", "keep": "all"},
80
80
  ThinkingLevel.XHIGH: {"type": "enabled", "keep": "all"},
81
+ ThinkingLevel.MAX: {"type": "enabled", "keep": "all"},
81
82
  }
82
83
  return mapping.get(thinking_level)
83
84
 
@@ -92,6 +93,7 @@ class KimiK3Client(LLMClient):
92
93
  ThinkingLevel.MEDIUM: "high",
93
94
  ThinkingLevel.HIGH: "high",
94
95
  ThinkingLevel.XHIGH: "max",
96
+ ThinkingLevel.MAX: "max",
95
97
  }
96
98
  return mapping.get(thinking_level)
97
99
 
@@ -63,6 +63,8 @@ class MiniMaxM3Client(LLMClient):
63
63
  ThinkingLevel.MEDIUM: "medium",
64
64
  ThinkingLevel.HIGH: "high",
65
65
  ThinkingLevel.XHIGH: "high",
66
+ # MiniMax stops at "high"
67
+ ThinkingLevel.MAX: "high",
66
68
  }
67
69
  return mapping[thinking_level]
68
70
 
@@ -54,6 +54,7 @@ class OpenaiResponsesClient(LLMClient):
54
54
  ThinkingLevel.MEDIUM: "medium",
55
55
  ThinkingLevel.HIGH: "high",
56
56
  ThinkingLevel.XHIGH: "xhigh",
57
+ ThinkingLevel.MAX: "max",
57
58
  }
58
59
  return mapping.get(thinking_level)
59
60
 
agenthub/types.py CHANGED
@@ -24,6 +24,7 @@ class ThinkingLevel(StrEnum):
24
24
  MEDIUM = "medium"
25
25
  HIGH = "high"
26
26
  XHIGH = "xhigh"
27
+ MAX = "max"
27
28
 
28
29
 
29
30
  class PromptCaching(StrEnum):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agenthub-python
3
- Version: 0.4.3
3
+ Version: 0.4.4
4
4
  Summary: AgentHub is the LLM API Hub for the Agent era, built for high-precision autonomous agents.
5
5
  Keywords: agent,llm,gemini,claude,gpt
6
6
  Author: PrismShadow
@@ -1,36 +1,36 @@
1
1
  agenthub/__init__.py,sha256=_SCnAB0y78Te6432QxG1aYzNpmTZ_rCvpWbpyrSunQc,1186
2
2
  agenthub/abort_signal.py,sha256=_j99RBZluBPdHLuRpZMyo15amll_8ZzmLO8fjLwEsaM,3744
3
3
  agenthub/ant_messages/__init__.py,sha256=wEz05advA7ggsvOYBffat7g8PN9TkOxYRBdeYPuoihY,672
4
- agenthub/ant_messages/client.py,sha256=xJTIPr_z81Qy0XIEjqSlAm64HWvx5Klvgs9b6QF45p4,18289
4
+ agenthub/ant_messages/client.py,sha256=8UZNdUzZN8N6NPW8P0G5f3QJUVa7vFKbiHn4b-RWmjg,18392
5
5
  agenthub/auto_client.py,sha256=wpfFovXcoxFeKM5xOT0vOegv50OwEjAlnUFmDnG1IeU,7459
6
6
  agenthub/base_client.py,sha256=gOK63Guv2jX2O0aYqQLMEENMeDBgeSl3GJ--69P2qI4,14016
7
7
  agenthub/claude5/__init__.py,sha256=FzP_ijkZ67kK6W-VJwRYTswzSCt_YaWbOEcybQ_2FyM,664
8
- agenthub/claude5/client.py,sha256=Xlk_YolAGGcSCFLNpReToid1lYWgGfqQ9XOtbNJQTMo,19954
8
+ agenthub/claude5/client.py,sha256=Oyn1FgbRVMvjbkAdKrPJulYoBuK7sx5bPSDNRyhnxuI,20150
9
9
  agenthub/deepseek_v4/__init__.py,sha256=MEBBJlx2kicstbG3ncJp1gLpIeTG_fwNh_uZVsc7JcI,670
10
- agenthub/deepseek_v4/client.py,sha256=lJScdTQhm7KS5DWC_VgpSf37kdAit1lIGkwj4LPSUoo,16067
10
+ agenthub/deepseek_v4/client.py,sha256=7gEVWBqrFMUD91VxSaN7H8T-Yut9wBqa-2I5JD489WE,16377
11
11
  agenthub/errors.py,sha256=0eZ_oeAQHi-8tZnW0yWoYhugPwdtjKl9gsJTJ1Rb5Ow,3350
12
12
  agenthub/gemini3_7/__init__.py,sha256=bMyPUwyiuyGPU0h2q5bqmL4gfwh7FcSeqK_6kLn9WGI,668
13
- agenthub/gemini3_7/client.py,sha256=K1D7YLH8QPMBih7Gfk6Mynx-FzOg4qmFkLyhh3SXM-c,24267
13
+ agenthub/gemini3_7/client.py,sha256=AJz4LgCzwj1yE8PiyJ5LozY90RhiiGcvp8-8ngWYuRg,24604
14
14
  agenthub/glm5_3/__init__.py,sha256=DJhHMvliHikxdNA8HLNmxzRXLPASCc6aFJZTfpMX7fg,662
15
- agenthub/glm5_3/client.py,sha256=TtB5B8-gC66I4wgsxlVIS2GP8GcxFGYhQPf4yAOpAhc,19343
15
+ agenthub/glm5_3/client.py,sha256=mHX1a1stdFlNYMnL0y4N1fUDxRh52w8WiIjASXRYUI4,19427
16
16
  agenthub/gpt5_6/__init__.py,sha256=_KgiOi_VqTL82pf9Ks7VM-d_x5-at8v-N1KZDWLVvt8,662
17
- agenthub/gpt5_6/client.py,sha256=Ie3BK83J1T6oDWwlupbMYlIBCIV0GqQexeK7HhXZoLE,16800
17
+ agenthub/gpt5_6/client.py,sha256=JbFdYEDSTBPk9AemSVY9YAPybtYRECWiTacUPYJg0hA,16838
18
18
  agenthub/integration/__init__.py,sha256=tlqmpVlFYm8uyMSa4RFebx5vi0FSS_GcES57JWVeu8c,600
19
- agenthub/integration/playground.py,sha256=mXoTVGnecCm1etP1CFoaOrfr3SxIYOMh1RqICLO3TrI,71380
19
+ agenthub/integration/playground.py,sha256=zhKE_Tnus6iYl-y395h_nomsYelDvZuQ5Wo0NFhUIVY,71728
20
20
  agenthub/integration/tracer.py,sha256=qAcU8rvnDJMgJHg4niwN9aANwSnxh8MrMaWpKBwLaZo,41963
21
21
  agenthub/kimi_k3/__init__.py,sha256=MnoMhqRI6tlaXmQCHEud-2BqAvyxa_7Bxv3X8khfC3g,662
22
- agenthub/kimi_k3/client.py,sha256=Kwf4fKfdPcpCembF61tXoc3PDAjaR7ejFM7OFv3OTd4,20374
22
+ agenthub/kimi_k3/client.py,sha256=98K0qg5qs0QmXWSz8UOn_6P4twcY0KDwJW9Bbv05Xfw,20479
23
23
  agenthub/minimax_m3/__init__.py,sha256=FTykS-0le7AdiU8zLeMjbj4QGBwR0oSIkOICqEFGoaw,668
24
- agenthub/minimax_m3/client.py,sha256=AFfYPxJwE9gPJEy7mDgUz7C0QgX5v_cJWA7BpVqiH6U,14268
24
+ agenthub/minimax_m3/client.py,sha256=9Jtlg4d3raGkgg_DI6yZ5qZDjSCI-kIut9sE1Q-OtUg,14345
25
25
  agenthub/openai_chat/__init__.py,sha256=6X-4sX0Xy9MqSYVglW4ytt3NMSAzoRM3I_NFKwqOIVQ,670
26
26
  agenthub/openai_chat/client.py,sha256=vosIlnDixNyoRrG_E_vnJXGC6Ks9f3KBl8gbPowzpa4,18078
27
27
  agenthub/openai_embedding/__init__.py,sha256=t1W8kBvZUXICjDfgjTVxw-uIh5qoneUgmSsGIYan02s,680
28
28
  agenthub/openai_embedding/client.py,sha256=5j9p-zjYSmsdzpWM1ldrWY9UFea6EtDHdxG2YDBgGSo,3739
29
29
  agenthub/openai_responses/__init__.py,sha256=Y0YAAnkRYpIEq62phw5EpTfPt_osFXptujhpwBggM1E,680
30
- agenthub/openai_responses/client.py,sha256=PmM6RH6bxfttkLipjUjNqqg-44Ly0YQyuCzte4jaAYI,16615
30
+ agenthub/openai_responses/client.py,sha256=8fVGgS6r8788slP_yf4JVSRSzvyJ9TTJGlvlSgaGT1w,16653
31
31
  agenthub/registry.py,sha256=FgJUkpjsmvYU1J6V20KlGIgkK3bCiiWS8RsELJPWiyY,21189
32
- agenthub/types.py,sha256=-hLYr5_K7FMOKLFK75M-i-HYg74v81Jl-gCzc3ZkX-o,5344
32
+ agenthub/types.py,sha256=hQapO7gvXHrlj3coh9Qw7OsOHkhXn04ni6GwdPA5xLw,5360
33
33
  agenthub/utils.py,sha256=A846vF-Tyo_BCWoWuB-R_fihRTSRoDuDPefqY0g8eLQ,1318
34
- agenthub_python-0.4.3.dist-info/WHEEL,sha256=4OL6Foqnnp3xRY5wMkjgc25_i5YJC6dKsC6LPcjqEoU,80
35
- agenthub_python-0.4.3.dist-info/METADATA,sha256=idP-p5TzTMvdUCAz86jTj0sUREiEh4r_d_uCtm7HV80,9112
36
- agenthub_python-0.4.3.dist-info/RECORD,,
34
+ agenthub_python-0.4.4.dist-info/WHEEL,sha256=4OL6Foqnnp3xRY5wMkjgc25_i5YJC6dKsC6LPcjqEoU,80
35
+ agenthub_python-0.4.4.dist-info/METADATA,sha256=CZhNNF_tQFBZvC4ZIl4omVM-2DDHbHSTUfUbTe4wNXI,9112
36
+ agenthub_python-0.4.4.dist-info/RECORD,,