LLM-Bridge 2.4.1__tar.gz → 2.4.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.
Files changed (106) hide show
  1. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/PKG-INFO +1 -1
  2. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/llm_bridge/client/implementations/openai_responses/openai_responses_response_handler.py +2 -2
  3. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/llm_bridge/client/model_client/gemini_client.py +0 -2
  4. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/llm_bridge/logic/chat_generate/media_processor.py +3 -3
  5. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/llm_bridge/logic/chat_generate/model_client_factory/gemini_client_factory.py +12 -13
  6. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/llm_bridge/logic/chat_generate/model_message_converter/claude_message_converter.py +4 -4
  7. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/llm_bridge/logic/chat_generate/model_message_converter/openai_completion_message_converter.py +4 -4
  8. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/llm_bridge/logic/chat_generate/model_message_converter/openai_responses_message_converter.py +6 -6
  9. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/llm_bridge/resources/model_prices.json +21 -21
  10. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/pyproject.toml +1 -1
  11. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/usage/single/config.py +2 -1
  12. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/uv.lock +1 -1
  13. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/.gitattributes +0 -0
  14. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/.github/workflows/pypi-publish.yaml +0 -0
  15. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/.github/workflows/python-test.yaml +0 -0
  16. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/.gitignore +0 -0
  17. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/.run/batch.run.xml +0 -0
  18. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/.run/pytest.run.xml +0 -0
  19. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/.run/single.run.xml +0 -0
  20. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/LICENSE +0 -0
  21. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/README.md +0 -0
  22. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/llm_bridge/__init__.py +0 -0
  23. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/llm_bridge/client/__init__.py +0 -0
  24. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/llm_bridge/client/chat_client.py +0 -0
  25. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/llm_bridge/client/implementations/__init__.py +0 -0
  26. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/llm_bridge/client/implementations/claude/__init__.py +0 -0
  27. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/llm_bridge/client/implementations/claude/claude_response_handler.py +0 -0
  28. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/llm_bridge/client/implementations/claude/claude_token_counter.py +0 -0
  29. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/llm_bridge/client/implementations/claude/non_stream_claude_client.py +2 -2
  30. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/llm_bridge/client/implementations/claude/stream_claude_client.py +2 -2
  31. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/llm_bridge/client/implementations/gemini/__init__.py +0 -0
  32. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/llm_bridge/client/implementations/gemini/gemini_response_handler.py +0 -0
  33. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/llm_bridge/client/implementations/gemini/gemini_token_counter.py +0 -0
  34. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/llm_bridge/client/implementations/gemini/non_stream_gemini_client.py +0 -0
  35. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/llm_bridge/client/implementations/gemini/stream_gemini_client.py +0 -0
  36. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/llm_bridge/client/implementations/http_error.py +0 -0
  37. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/llm_bridge/client/implementations/openai_completion/__init__.py +0 -0
  38. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/llm_bridge/client/implementations/openai_completion/non_stream_openai_completion_client.py +0 -0
  39. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/llm_bridge/client/implementations/openai_completion/stream_openai_completion_client.py +0 -0
  40. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/llm_bridge/client/implementations/openai_responses/__init__.py +0 -0
  41. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/llm_bridge/client/implementations/openai_responses/non_stream_openai_responses_client.py +0 -0
  42. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/llm_bridge/client/implementations/openai_responses/stream_openai_responses_client.py +0 -0
  43. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/llm_bridge/client/implementations/xai/__init__.py +0 -0
  44. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/llm_bridge/client/implementations/xai/non_stream_xai_client.py +0 -0
  45. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/llm_bridge/client/implementations/xai/stream_xai_client.py +0 -0
  46. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/llm_bridge/client/model_client/__init__.py +0 -0
  47. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/llm_bridge/client/model_client/claude_client.py +4 -4
  48. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/llm_bridge/client/model_client/openai_completion_client.py +0 -0
  49. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/llm_bridge/client/model_client/openai_responses_client.py +0 -0
  50. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/llm_bridge/client/model_client/xai_client.py +0 -0
  51. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/llm_bridge/logic/__init__.py +0 -0
  52. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/llm_bridge/logic/chat_generate/__init__.py +0 -0
  53. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/llm_bridge/logic/chat_generate/chat_client_factory.py +0 -0
  54. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/llm_bridge/logic/chat_generate/chat_message_converter.py +0 -0
  55. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/llm_bridge/logic/chat_generate/model_client_factory/__init__.py +0 -0
  56. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/llm_bridge/logic/chat_generate/model_client_factory/claude_client_factory.py +4 -4
  57. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/llm_bridge/logic/chat_generate/model_client_factory/openai_completion_client_factory.py +0 -0
  58. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/llm_bridge/logic/chat_generate/model_client_factory/openai_responses_client_factory.py +0 -0
  59. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/llm_bridge/logic/chat_generate/model_client_factory/xai_client_factory.py +0 -0
  60. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/llm_bridge/logic/chat_generate/model_message_converter/__init__.py +0 -0
  61. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/llm_bridge/logic/chat_generate/model_message_converter/gemini_message_converter.py +0 -0
  62. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/llm_bridge/logic/chat_generate/model_message_converter/gemini_mime_types.py +0 -0
  63. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/llm_bridge/logic/chat_generate/model_message_converter/xai_message_converter.py +0 -0
  64. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/llm_bridge/logic/file_fetch.py +0 -0
  65. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/llm_bridge/logic/message_process/__init__.py +0 -0
  66. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/llm_bridge/logic/message_process/code_file_extensions.py +0 -0
  67. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/llm_bridge/logic/message_process/document_processor.py +0 -0
  68. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/llm_bridge/logic/message_process/file_type_checker.py +0 -0
  69. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/llm_bridge/logic/message_process/message_processor.py +0 -0
  70. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/llm_bridge/logic/model_prices.py +0 -0
  71. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/llm_bridge/resources/__init__.py +0 -0
  72. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/llm_bridge/type/__init__.py +0 -0
  73. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/llm_bridge/type/chat_response.py +0 -0
  74. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/llm_bridge/type/message.py +0 -0
  75. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/llm_bridge/type/model_message/__init__.py +0 -0
  76. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/llm_bridge/type/model_message/claude_message.py +0 -0
  77. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/llm_bridge/type/model_message/gemini_message.py +0 -0
  78. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/llm_bridge/type/model_message/openai_completion_message.py +0 -0
  79. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/llm_bridge/type/model_message/openai_responses_message.py +0 -0
  80. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/llm_bridge/type/model_message/xai_message.py +0 -0
  81. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/llm_bridge/type/serializer.py +0 -0
  82. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/tests/__init__.py +0 -0
  83. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/tests/logic/__init__.py +0 -0
  84. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/tests/logic/chat_generate/__init__.py +0 -0
  85. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/tests/logic/chat_generate/model_message_converter/__init__.py +0 -0
  86. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/tests/logic/chat_generate/model_message_converter/claude_message_converter_test.py +0 -0
  87. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/tests/logic/chat_generate/model_message_converter/gemini_message_converter_test.py +0 -0
  88. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/tests/logic/chat_generate/model_message_converter/openai_completion_message_converter_test.py +0 -0
  89. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/tests/logic/chat_generate/model_message_converter/openai_responses_message_converter_test.py +0 -0
  90. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/tests/logic/chat_generate/model_message_converter/xai_message_converter_test.py +0 -0
  91. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/tests/logic/message_factory.py +0 -0
  92. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/tests/logic/message_process/__init__.py +0 -0
  93. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/tests/logic/message_process/file_type_checker_test.py +0 -0
  94. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/tests/logic/message_process/message_processor_test.py +0 -0
  95. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/tests/logic/model_prices_test.py +0 -0
  96. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/usage/.env.example +0 -0
  97. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/usage/__init__.py +0 -0
  98. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/usage/batch/__init__.py +0 -0
  99. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/usage/batch/batch.py +0 -0
  100. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/usage/batch/config.py +0 -0
  101. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/usage/example_file_urls.py +0 -0
  102. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/usage/keys.py +0 -0
  103. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/usage/messages.py +0 -0
  104. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/usage/single/__init__.py +0 -0
  105. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/usage/single/single.py +0 -0
  106. {llm_bridge-2.4.1 → llm_bridge-2.4.3}/usage/workflow.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: LLM-Bridge
3
- Version: 2.4.1
3
+ Version: 2.4.3
4
4
  Summary: A library that wraps multiple LLM providers into a consistent API while using each provider's native SDK internally, supporting multimodal I/O, file processing, and stream output.
5
5
  Author-email: windsnow1025 <windsnow1025@gmail.com>
6
6
  License-Expression: MIT
@@ -18,10 +18,10 @@ async def process_code_interpreter_outputs(interpreter_outputs: list[Output]) ->
18
18
  if isinstance(interpreter_output, OutputLogs):
19
19
  code_output += interpreter_output.logs
20
20
  if isinstance(interpreter_output, OutputImage):
21
- data, _ = await get_base64_content_from_url(interpreter_output.url)
21
+ base64_data, _ = await get_base64_content_from_url(interpreter_output.url)
22
22
  file = File(
23
23
  name="code_interpreter_call_output.png",
24
- data=data,
24
+ data=base64_data,
25
25
  type="image/png",
26
26
  )
27
27
  files.append(file)
@@ -13,13 +13,11 @@ class GeminiClient(ChatClient):
13
13
  self,
14
14
  model: str,
15
15
  messages: list[GeminiMessage],
16
- temperature: float,
17
16
  client: genai.Client,
18
17
  config: types.GenerateContentConfig,
19
18
  ):
20
19
  self.model = model
21
20
  self.messages = messages
22
- self.temperature = temperature
23
21
  self.client = client
24
22
  self.config = config
25
23
 
@@ -13,6 +13,6 @@ async def get_bytes_content_from_url(req_url: str) -> tuple[bytes, str]:
13
13
 
14
14
 
15
15
  async def get_base64_content_from_url(req_url: str) -> tuple[str, str]:
16
- media_data, media_type = await get_bytes_content_from_url(req_url)
17
- base64_media = bytes_to_base64(media_data)
18
- return base64_media, media_type
16
+ file_data, media_type = await get_bytes_content_from_url(req_url)
17
+ base64_data = bytes_to_base64(file_data)
18
+ return base64_data, media_type
@@ -84,7 +84,6 @@ async def create_gemini_client(
84
84
 
85
85
  config = types.GenerateContentConfig(
86
86
  system_instruction=system_instruction,
87
- temperature=temperature,
88
87
  safety_settings=[
89
88
  types.SafetySetting(
90
89
  category=types.HarmCategory.HARM_CATEGORY_HATE_SPEECH,
@@ -112,19 +111,21 @@ async def create_gemini_client(
112
111
  response_modalities=response_modalities,
113
112
  )
114
113
 
114
+ if "image" in model:
115
+ config.temperature = temperature
116
+
115
117
  if "pro-image" not in model:
116
118
  config.media_resolution = MediaResolution.MEDIA_RESOLUTION_HIGH
117
119
 
118
- if model in ["gemini-3.1-pro-preview", "gemini-3.8-flash", "gemini-3.6-flash", "gemini-3-flash-preview", "gemini-3-pro-image", "gemini-3.1-flash-image"]:
119
- if vertexai:
120
- config.http_options = types.HttpOptions(
121
- headers={
122
- "X-Vertex-AI-LLM-Request-Type": "shared",
123
- "X-Vertex-AI-LLM-Shared-Request-Type": "priority",
124
- }
125
- )
126
- elif not free_tier:
127
- config.service_tier = types.ServiceTier.PRIORITY
120
+ if vertexai:
121
+ config.http_options = types.HttpOptions(
122
+ headers={
123
+ "X-Vertex-AI-LLM-Request-Type": "shared",
124
+ "X-Vertex-AI-LLM-Shared-Request-Type": "priority",
125
+ }
126
+ )
127
+ elif not free_tier:
128
+ config.service_tier = types.ServiceTier.PRIORITY
128
129
 
129
130
  if structured_output_schema:
130
131
  config.response_mime_type = "application/json"
@@ -136,7 +137,6 @@ async def create_gemini_client(
136
137
  return StreamGeminiClient(
137
138
  model=model,
138
139
  messages=gemini_messages,
139
- temperature=temperature,
140
140
  client=client,
141
141
  config=config,
142
142
  )
@@ -144,7 +144,6 @@ async def create_gemini_client(
144
144
  return NonStreamGeminiClient(
145
145
  model=model,
146
146
  messages=gemini_messages,
147
- temperature=temperature,
148
147
  client=client,
149
148
  config=config,
150
149
  )
@@ -35,28 +35,28 @@ async def convert_message_to_claude(message: Message) -> ClaudeMessage:
35
35
  file_url = content_item.data
36
36
  file_type, sub_type = await get_file_type(file_url)
37
37
  if file_type == "image":
38
- base64_image, media_type = await media_processor.get_base64_content_from_url(file_url)
38
+ base64_data, media_type = await media_processor.get_base64_content_from_url(file_url)
39
39
  if media_type in ("image/jpeg", "image/png", "image/gif", "image/webp"):
40
40
  image_content = ImageBlockParam(
41
41
  type="image",
42
42
  source=Base64ImageSourceParam(
43
43
  type="base64",
44
44
  media_type=media_type,
45
- data=base64_image
45
+ data=base64_data
46
46
  )
47
47
  )
48
48
  claude_content.append(image_content)
49
49
  else:
50
50
  claude_content.append(create_unsupported_content(file_url, file_type, sub_type))
51
51
  elif sub_type == "pdf":
52
- file_data, media_type = await media_processor.get_base64_content_from_url(file_url)
52
+ base64_data, media_type = await media_processor.get_base64_content_from_url(file_url)
53
53
  if media_type == "application/pdf":
54
54
  pdf_content = DocumentBlockParam(
55
55
  type="document",
56
56
  source=Base64PDFSourceParam(
57
57
  type="base64",
58
58
  media_type=media_type,
59
- data=file_data
59
+ data=base64_data
60
60
  ),
61
61
  )
62
62
  claude_content.append(pdf_content)
@@ -33,8 +33,8 @@ async def convert_message_to_openai_completion(message: Message) -> OpenAIComple
33
33
  file_url = content_item.data
34
34
  file_type, sub_type = await get_file_type(file_url)
35
35
  if file_type == "image":
36
- base64_image, media_type = await media_processor.get_base64_content_from_url(file_url)
37
- image_url = f"data:{media_type};base64,{base64_image}"
36
+ base64_data, media_type = await media_processor.get_base64_content_from_url(file_url)
37
+ image_url = f"data:{media_type};base64,{base64_data}"
38
38
  image_content = ChatCompletionContentPartImageParam(
39
39
  type="image_url",
40
40
  image_url=ImageURL(url=image_url)
@@ -43,10 +43,10 @@ async def convert_message_to_openai_completion(message: Message) -> OpenAIComple
43
43
  elif file_type == "audio":
44
44
  audio_format = get_file_extension(file_url)
45
45
  if audio_format in ("wav", "mp3"):
46
- encoded_string, _ = await media_processor.get_base64_content_from_url(file_url)
46
+ base64_data, _ = await media_processor.get_base64_content_from_url(file_url)
47
47
  audio_content = ChatCompletionContentPartInputAudioParam(
48
48
  type="input_audio",
49
- input_audio=InputAudio(data=encoded_string, format=audio_format)
49
+ input_audio=InputAudio(data=base64_data, format=audio_format)
50
50
  )
51
51
  content.append(audio_content)
52
52
  else:
@@ -30,8 +30,8 @@ async def convert_input_content(message: Message) -> tuple[list[OpenAIResponsesC
30
30
  file_url = content_item.data
31
31
  file_type, sub_type = await get_file_type(file_url)
32
32
  if file_type == "image":
33
- base64_image, media_type = await media_processor.get_base64_content_from_url(file_url)
34
- image_url = f"data:{media_type};base64,{base64_image}"
33
+ base64_data, media_type = await media_processor.get_base64_content_from_url(file_url)
34
+ image_url = f"data:{media_type};base64,{base64_data}"
35
35
  content.append(ResponseInputImageParam(
36
36
  type="input_image",
37
37
  image_url=image_url,
@@ -39,20 +39,20 @@ async def convert_input_content(message: Message) -> tuple[list[OpenAIResponsesC
39
39
  ))
40
40
  elif sub_type == "pdf":
41
41
  contains_pdf = True
42
- file_data, _ = await media_processor.get_base64_content_from_url(file_url)
42
+ base64_data, _ = await media_processor.get_base64_content_from_url(file_url)
43
43
  content.append(ResponseInputFileParam(
44
44
  type="input_file",
45
45
  filename=get_filename_without_timestamp(file_url),
46
- file_data=f"data:application/pdf;base64,{file_data}",
46
+ file_data=f"data:application/pdf;base64,{base64_data}",
47
47
  ))
48
48
  # Audio Input not supported in Responses API
49
49
  # elif file_type == "audio":
50
50
  # audio_format = get_file_extension(file_url)
51
51
  # if audio_format in ("wav", "mp3"):
52
- # file_data, _ = await media_processor.get_base64_content_from_url(file_url)
52
+ # base64_data, _ = await media_processor.get_base64_content_from_url(file_url)
53
53
  # audio_content = ResponseInputAudioParam(
54
54
  # type="input_audio",
55
- # input_audio=InputAudio(data=file_data, format=audio_format)
55
+ # input_audio=InputAudio(data=base64_data, format=audio_format)
56
56
  # )
57
57
  # content.append(audio_content)
58
58
  # else:
@@ -1,15 +1,21 @@
1
1
  [
2
2
  {
3
3
  "apiType": "Google AI Studio",
4
- "model": "gemini-4-argon",
4
+ "model": "gemini-4-carbon",
5
5
  "input": 7.2,
6
6
  "output": 36
7
7
  },
8
8
  {
9
9
  "apiType": "Google AI Studio",
10
- "model": "gemini-3.1-pro-preview",
10
+ "model": "gemini-4-argon",
11
11
  "input": 7.2,
12
- "output": 32.4
12
+ "output": 36
13
+ },
14
+ {
15
+ "apiType": "Google AI Studio",
16
+ "model": "gemini-4-hydrogen",
17
+ "input": 2.7,
18
+ "output": 13.5
13
19
  },
14
20
  {
15
21
  "apiType": "Google AI Studio",
@@ -29,12 +35,6 @@
29
35
  "input": 2.7,
30
36
  "output": 13.5
31
37
  },
32
- {
33
- "apiType": "Google AI Studio",
34
- "model": "gemini-3-flash-preview",
35
- "input": 1.8,
36
- "output": 5.4
37
- },
38
38
  {
39
39
  "apiType": "Google AI Studio",
40
40
  "model": "gemini-3-pro-image",
@@ -157,15 +157,21 @@
157
157
  },
158
158
  {
159
159
  "apiType": "Vertex AI",
160
- "model": "gemini-4-argon",
160
+ "model": "gemini-4-carbon",
161
161
  "input": 7.2,
162
162
  "output": 36
163
163
  },
164
164
  {
165
165
  "apiType": "Vertex AI",
166
- "model": "gemini-3.1-pro-preview",
166
+ "model": "gemini-4-argon",
167
167
  "input": 7.2,
168
- "output": 32.4
168
+ "output": 36
169
+ },
170
+ {
171
+ "apiType": "Vertex AI",
172
+ "model": "gemini-4-hydrogen",
173
+ "input": 2.7,
174
+ "output": 13.5
169
175
  },
170
176
  {
171
177
  "apiType": "Vertex AI",
@@ -185,12 +191,6 @@
185
191
  "input": 2.7,
186
192
  "output": 13.5
187
193
  },
188
- {
189
- "apiType": "Vertex AI",
190
- "model": "gemini-3-flash-preview",
191
- "input": 1.8,
192
- "output": 5.4
193
- },
194
194
  {
195
195
  "apiType": "Vertex AI",
196
196
  "model": "gemini-3-pro-image",
@@ -205,19 +205,19 @@
205
205
  },
206
206
  {
207
207
  "apiType": "Google AI Studio Free Tier",
208
- "model": "gemini-3.8-flash",
208
+ "model": "gemini-4-hydrogen",
209
209
  "input": 0,
210
210
  "output": 0
211
211
  },
212
212
  {
213
213
  "apiType": "Google AI Studio Free Tier",
214
- "model": "gemini-3.6-flash",
214
+ "model": "gemini-3.8-flash",
215
215
  "input": 0,
216
216
  "output": 0
217
217
  },
218
218
  {
219
219
  "apiType": "Google AI Studio Free Tier",
220
- "model": "gemini-3-flash-preview",
220
+ "model": "gemini-3.6-flash",
221
221
  "input": 0,
222
222
  "output": 0
223
223
  },
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "LLM-Bridge"
7
- version = "2.4.1"
7
+ version = "2.4.3"
8
8
  dependencies = [
9
9
  "fastapi",
10
10
  "httpx",
@@ -176,8 +176,9 @@ messages = [
176
176
  # model = "gpt-5.6-luna"
177
177
  # model = "gpt-4.1"
178
178
  # model = "gpt-audio-1.5"
179
+ # model = "gemini-4-carbon"
179
180
  # model = "gemini-4-argon"
180
- # model = "gemini-3.1-pro-preview"
181
+ # model = "gemini-4-hydrogen"
181
182
  # model = "gemini-3-pro-image"
182
183
  # model = "gemini-3.1-flash-image"
183
184
  # model = "gemini-3.5-flash"
@@ -798,7 +798,7 @@ wheels = [
798
798
 
799
799
  [[package]]
800
800
  name = "llm-bridge"
801
- version = "2.4.1"
801
+ version = "2.4.3"
802
802
  source = { editable = "." }
803
803
  dependencies = [
804
804
  { name = "anthropic" },
File without changes
File without changes
File without changes
File without changes
@@ -14,9 +14,9 @@ class NonStreamClaudeClient(ClaudeClient):
14
14
 
15
15
  message = await self.client.beta.messages.create(
16
16
  model=self.model,
17
- messages=serialize(self.messages),
18
- system=self.system,
19
17
  max_tokens=self.max_tokens,
18
+ system=self.system,
19
+ messages=serialize(self.messages),
20
20
  betas=self.betas,
21
21
  tools=self.tools,
22
22
  cache_control=self.cache_control,
@@ -34,9 +34,9 @@ class StreamClaudeClient(ClaudeClient):
34
34
 
35
35
  stream: AsyncStream[BetaRawMessageStreamEvent] = await self.client.beta.messages.create(
36
36
  model=self.model,
37
- messages=serialize(self.messages),
38
- system=self.system,
39
37
  max_tokens=self.max_tokens,
38
+ system=self.system,
39
+ messages=serialize(self.messages),
40
40
  stream=True,
41
41
  betas=self.betas,
42
42
  tools=self.tools,
@@ -16,9 +16,9 @@ class ClaudeClient(ChatClient):
16
16
  def __init__(
17
17
  self,
18
18
  model: str,
19
- messages: list[ClaudeMessage],
20
- system: str,
21
19
  max_tokens: int,
20
+ system: str,
21
+ messages: list[ClaudeMessage],
22
22
  client: anthropic.AsyncAnthropic,
23
23
  betas: list[AnthropicBetaParam] | Omit,
24
24
  tools: list[BetaToolUnionParam],
@@ -28,9 +28,9 @@ class ClaudeClient(ChatClient):
28
28
  output_config: BetaOutputConfigParam | Omit,
29
29
  ):
30
30
  self.model = model
31
- self.messages = messages
32
- self.system = system
33
31
  self.max_tokens = max_tokens
32
+ self.system = system
33
+ self.messages = messages
34
34
  self.client = client
35
35
  self.betas = betas
36
36
  self.tools = tools
@@ -99,9 +99,9 @@ async def create_claude_client(
99
99
  if stream:
100
100
  return StreamClaudeClient(
101
101
  model=model,
102
- messages=claude_messages,
103
- system=system,
104
102
  max_tokens=max_tokens,
103
+ system=system,
104
+ messages=claude_messages,
105
105
  client=client,
106
106
  betas=betas,
107
107
  tools=tools,
@@ -113,9 +113,9 @@ async def create_claude_client(
113
113
  else:
114
114
  return NonStreamClaudeClient(
115
115
  model=model,
116
- messages=claude_messages,
117
- system=system,
118
116
  max_tokens=max_tokens,
117
+ system=system,
118
+ messages=claude_messages,
119
119
  client=client,
120
120
  betas=betas,
121
121
  tools=tools,
File without changes
File without changes
File without changes
File without changes
File without changes