LLM-Bridge 1.12.1__py3-none-any.whl → 1.12.3__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.
@@ -36,9 +36,13 @@ async def create_claude_client(
36
36
  messages=claude_messages,
37
37
  )
38
38
 
39
+ context_window = 200_000
40
+ if model in ["claude-sonnet-4-5"]:
41
+ context_window = 1_000_000
42
+ max_output = 64_000
39
43
  max_tokens = min(
40
- 32_000, # Max output: Claude 4.5 64K; Claude 4.1 32K
41
- 200_000 - input_tokens, # Context window: Claude Sonnet 4.5 beta: 1M; otherwise 200K
44
+ max_output,
45
+ context_window - input_tokens,
42
46
  )
43
47
  thinking = None
44
48
  if thought:
@@ -52,12 +56,13 @@ async def create_claude_client(
52
56
  "output-128k-2025-02-19",
53
57
  "code-execution-2025-08-25",
54
58
  ]
55
- tools: list[BetaToolUnionParam] = [
59
+ tools: list[BetaToolUnionParam] = []
60
+ tools.append(
56
61
  BetaWebSearchTool20250305Param(
57
62
  type="web_search_20250305",
58
63
  name="web_search",
59
- ),
60
- ]
64
+ )
65
+ )
61
66
  if code_execution:
62
67
  tools.append(
63
68
  BetaCodeExecutionTool20250825Param(
@@ -29,22 +29,22 @@ async def create_gemini_client(
29
29
  thinking_config = None
30
30
  response_modalities = [Modality.TEXT]
31
31
 
32
- if "image" not in model:
33
- tools.append(
34
- types.Tool(
35
- google_search=types.GoogleSearch()
36
- )
32
+ tools.append(
33
+ types.Tool(
34
+ google_search=types.GoogleSearch()
37
35
  )
36
+ )
37
+ if thought:
38
+ thinking_config = types.ThinkingConfig(
39
+ include_thoughts=True,
40
+ thinking_budget=-1,
41
+ )
42
+ if "image" not in model:
38
43
  tools.append(
39
44
  types.Tool(
40
45
  url_context=types.UrlContext()
41
46
  )
42
47
  )
43
- if thought:
44
- thinking_config = types.ThinkingConfig(
45
- include_thoughts=True,
46
- thinking_budget=-1,
47
- )
48
48
  if not vertexai:
49
49
  if code_execution:
50
50
  tools.append(
@@ -5,6 +5,12 @@
5
5
  "input": 4,
6
6
  "output": 18
7
7
  },
8
+ {
9
+ "apiType": "Gemini-Vertex",
10
+ "model": "gemini-3-pro-image-preview",
11
+ "input": 2,
12
+ "output": 120
13
+ },
8
14
  {
9
15
  "apiType": "Gemini-Vertex",
10
16
  "model": "gemini-2.5-flash",
@@ -17,12 +23,6 @@
17
23
  "input": 2.5,
18
24
  "output": 15
19
25
  },
20
- {
21
- "apiType": "Gemini-Vertex",
22
- "model": "gemini-2.5-flash-image",
23
- "input": 1.0,
24
- "output": 2.5
25
- },
26
26
  {
27
27
  "apiType": "Gemini-Free",
28
28
  "model": "gemini-flash-latest",
@@ -41,18 +41,18 @@
41
41
  "input": 0,
42
42
  "output": 0
43
43
  },
44
- {
45
- "apiType": "Gemini-Free",
46
- "model": "gemini-2.5-flash-image-preview",
47
- "input": 0,
48
- "output": 0
49
- },
50
44
  {
51
45
  "apiType": "Gemini-Paid",
52
46
  "model": "gemini-3-pro-preview",
53
47
  "input": 4,
54
48
  "output": 18
55
49
  },
50
+ {
51
+ "apiType": "Gemini-Paid",
52
+ "model": "gemini-3-pro-image-preview",
53
+ "input": 2,
54
+ "output": 120
55
+ },
56
56
  {
57
57
  "apiType": "Gemini-Paid",
58
58
  "model": "gemini-flash-latest",
@@ -71,12 +71,6 @@
71
71
  "input": 2.5,
72
72
  "output": 15
73
73
  },
74
- {
75
- "apiType": "Gemini-Paid",
76
- "model": "gemini-2.5-flash-image",
77
- "input": 1.0,
78
- "output": 2.5
79
- },
80
74
  {
81
75
  "apiType": "OpenAI",
82
76
  "model": "gpt-5.1",
@@ -125,6 +119,12 @@
125
119
  "input": 0,
126
120
  "output": 0
127
121
  },
122
+ {
123
+ "apiType": "Claude",
124
+ "model": "claude-opus-4-5",
125
+ "input": 5,
126
+ "output": 25
127
+ },
128
128
  {
129
129
  "apiType": "Claude",
130
130
  "model": "claude-sonnet-4-5",
@@ -137,12 +137,6 @@
137
137
  "input": 1,
138
138
  "output": 5
139
139
  },
140
- {
141
- "apiType": "Claude",
142
- "model": "claude-opus-4-1",
143
- "input": 15,
144
- "output": 75
145
- },
146
140
  {
147
141
  "apiType": "Grok",
148
142
  "model": "grok-4-latest",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: LLM-Bridge
3
- Version: 1.12.1
3
+ Version: 1.12.3
4
4
  Summary: A Bridge for LLMs
5
5
  Author-email: windsnow1025 <windsnow1025@gmail.com>
6
6
  License-Expression: MIT
@@ -31,8 +31,8 @@ llm_bridge/logic/chat_generate/chat_client_factory.py,sha256=i2Lefytc2Sc6Ownjq7o
31
31
  llm_bridge/logic/chat_generate/chat_message_converter.py,sha256=40VTBOPXg_ocrEZMdt1ObYlm-mhRL35zWzzxv8m2xRc,1538
32
32
  llm_bridge/logic/chat_generate/media_processor.py,sha256=ZR8G24EHwZZr2T9iFDRmScDGyJ_kvThApABzSzK0CL0,702
33
33
  llm_bridge/logic/chat_generate/model_client_factory/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
34
- llm_bridge/logic/chat_generate/model_client_factory/claude_client_factory.py,sha256=8qhKE8H6bEUiCDc8ZYaKuzeAe2ne_6oNGR0Y-FQHJTk,3011
35
- llm_bridge/logic/chat_generate/model_client_factory/gemini_client_factory.py,sha256=j4V3l8I3G4qmJzK1ZVpCKnUxsSEkPA5nL72MCywxHIg,3394
34
+ llm_bridge/logic/chat_generate/model_client_factory/claude_client_factory.py,sha256=bdO-4LBSwe1x8_5kamVg6dpRkxGB8_FXgRaaNH53qUs,3059
35
+ llm_bridge/logic/chat_generate/model_client_factory/gemini_client_factory.py,sha256=DZBOoVOBk1fUdigjoYqdp7sUohOQR1_x3U6mvzC9RE4,3354
36
36
  llm_bridge/logic/chat_generate/model_client_factory/openai_client_factory.py,sha256=EoU5kyccnwOKjGdFi5yTozNVPrq402jRtWPjSmBJs7M,4517
37
37
  llm_bridge/logic/chat_generate/model_message_converter/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
38
38
  llm_bridge/logic/chat_generate/model_message_converter/claude_message_converter.py,sha256=SfDhQXR7L5nCPHS4MIjwgzK_wER7qOUCc8gh-K77kKY,2441
@@ -45,7 +45,7 @@ llm_bridge/logic/message_preprocess/document_processor.py,sha256=IsVqoFgWNa9i8cR
45
45
  llm_bridge/logic/message_preprocess/file_type_checker.py,sha256=nkrVki1a2udCeVqUnfIVi7Wxx8OMKbBuHw3FOlm17uo,1603
46
46
  llm_bridge/logic/message_preprocess/message_preprocessor.py,sha256=VR4__ip4ytAo62DHn9HeeYdbcx5lWItBnKsm9l3gmY4,1924
47
47
  llm_bridge/resources/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
48
- llm_bridge/resources/model_prices.json,sha256=JUvODxZICUqeD2vDmZCpvATE6nlCZgpU8VmQj9M9LaE,3086
48
+ llm_bridge/resources/model_prices.json,sha256=P3BINetP2h-mtenmWLU_QMfvDEYhTdZa9JlFWSgw-Ec,2971
49
49
  llm_bridge/type/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
50
50
  llm_bridge/type/chat_response.py,sha256=zEw-my_I0-7msmlTySdBGE2vWUIPILex0UrUPqTJiYY,754
51
51
  llm_bridge/type/message.py,sha256=NyWmSSrciFfvF81aBwAH8qFpo5IpRhh8QXMselbYen8,370
@@ -55,8 +55,8 @@ llm_bridge/type/model_message/claude_message.py,sha256=gYJUTbLUeifQMva3Axarc-VFe
55
55
  llm_bridge/type/model_message/gemini_message.py,sha256=mh8pf929g7_NkBzSOwnLXyrwSzTT4yt2FmyX7NZn0sM,4302
56
56
  llm_bridge/type/model_message/openai_message.py,sha256=xFaLY-cZoSwNd7E9BSWQjBNcRfCVH11X9s2yxXlctR0,453
57
57
  llm_bridge/type/model_message/openai_responses_message.py,sha256=be1q2euA0ybjj4NO6NxOGIRB9eJuXSb4ssUm_bM4Ocs,1529
58
- llm_bridge-1.12.1.dist-info/licenses/LICENSE,sha256=m6uon-6P_CaiqcBfApMfjG9YRtDxcr40Z52JcqUCEAE,1069
59
- llm_bridge-1.12.1.dist-info/METADATA,sha256=Q0zdwFJs9HeNtHeoFRXzdOMMyDnj9txRsChxF-a_m0Q,3388
60
- llm_bridge-1.12.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
61
- llm_bridge-1.12.1.dist-info/top_level.txt,sha256=PtxyrgNX1lSa1Ab_qswg0sekSXejG5zrS6b_v3Po05g,11
62
- llm_bridge-1.12.1.dist-info/RECORD,,
58
+ llm_bridge-1.12.3.dist-info/licenses/LICENSE,sha256=m6uon-6P_CaiqcBfApMfjG9YRtDxcr40Z52JcqUCEAE,1069
59
+ llm_bridge-1.12.3.dist-info/METADATA,sha256=1K-UeIAkLrzVjaCJ2AhMsw3hYVUi3Z5DofWAzRMpqDE,3388
60
+ llm_bridge-1.12.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
61
+ llm_bridge-1.12.3.dist-info/top_level.txt,sha256=PtxyrgNX1lSa1Ab_qswg0sekSXejG5zrS6b_v3Po05g,11
62
+ llm_bridge-1.12.3.dist-info/RECORD,,