LLM-Bridge 2.2.1__tar.gz → 2.2.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.
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/PKG-INFO +1 -1
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/client/implementations/claude/non_stream_claude_client.py +3 -2
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/client/implementations/claude/stream_claude_client.py +4 -3
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/client/model_client/claude_client.py +3 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/logic/chat_generate/model_client_factory/claude_client_factory.py +8 -1
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/resources/model_prices.json +2 -2
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/pyproject.toml +1 -1
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/uv.lock +1 -1
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/.gitattributes +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/.github/workflows/pypi-publish.yaml +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/.github/workflows/python-test.yaml +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/.gitignore +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/.run/batch.run.xml +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/.run/pytest.run.xml +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/.run/single.run.xml +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/LICENSE +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/README.md +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/__init__.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/client/__init__.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/client/chat_client.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/client/implementations/__init__.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/client/implementations/claude/__init__.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/client/implementations/claude/claude_response_handler.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/client/implementations/claude/claude_token_counter.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/client/implementations/gemini/__init__.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/client/implementations/gemini/gemini_response_handler.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/client/implementations/gemini/gemini_token_counter.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/client/implementations/gemini/non_stream_gemini_client.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/client/implementations/gemini/stream_gemini_client.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/client/implementations/http_error.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/client/implementations/openai_completion/__init__.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/client/implementations/openai_completion/non_stream_openai_completion_client.py +1 -1
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/client/implementations/openai_completion/stream_openai_completion_client.py +1 -1
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/client/implementations/openai_responses/__init__.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/client/implementations/openai_responses/non_stream_openai_responses_client.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/client/implementations/openai_responses/openai_responses_response_handler.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/client/implementations/openai_responses/stream_openai_responses_client.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/client/implementations/xai/__init__.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/client/implementations/xai/non_stream_xai_client.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/client/implementations/xai/stream_xai_client.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/client/model_client/__init__.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/client/model_client/gemini_client.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/client/model_client/openai_completion_client.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/client/model_client/openai_responses_client.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/client/model_client/xai_client.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/logic/__init__.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/logic/chat_generate/__init__.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/logic/chat_generate/chat_client_factory.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/logic/chat_generate/chat_message_converter.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/logic/chat_generate/media_processor.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/logic/chat_generate/model_client_factory/__init__.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/logic/chat_generate/model_client_factory/gemini_client_factory.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/logic/chat_generate/model_client_factory/openai_completion_client_factory.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/logic/chat_generate/model_client_factory/openai_responses_client_factory.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/logic/chat_generate/model_client_factory/xai_client_factory.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/logic/chat_generate/model_message_converter/__init__.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/logic/chat_generate/model_message_converter/claude_message_converter.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/logic/chat_generate/model_message_converter/gemini_message_converter.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/logic/chat_generate/model_message_converter/openai_completion_message_converter.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/logic/chat_generate/model_message_converter/openai_responses_message_converter.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/logic/chat_generate/model_message_converter/xai_message_converter.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/logic/file_fetch.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/logic/message_process/__init__.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/logic/message_process/code_file_extensions.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/logic/message_process/document_processor.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/logic/message_process/file_type_checker.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/logic/message_process/message_processor.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/logic/model_prices.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/resources/__init__.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/type/__init__.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/type/chat_response.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/type/message.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/type/model_message/__init__.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/type/model_message/claude_message.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/type/model_message/gemini_message.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/type/model_message/openai_completion_message.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/type/model_message/openai_responses_message.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/type/model_message/xai_message.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/type/serializer.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/tests/__init__.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/tests/logic/__init__.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/tests/logic/chat_generate/__init__.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/tests/logic/chat_generate/model_message_converter/__init__.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/tests/logic/chat_generate/model_message_converter/claude_message_converter_test.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/tests/logic/chat_generate/model_message_converter/gemini_message_converter_test.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/tests/logic/chat_generate/model_message_converter/message_factory.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/tests/logic/chat_generate/model_message_converter/openai_completion_message_converter_test.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/tests/logic/chat_generate/model_message_converter/openai_responses_message_converter_test.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/tests/logic/chat_generate/model_message_converter/xai_message_converter_test.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/tests/logic/message_process/__init__.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/tests/logic/message_process/file_type_checker_test.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/tests/logic/model_prices_test.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/usage/.env.example +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/usage/__init__.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/usage/batch/__init__.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/usage/batch/batch.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/usage/batch/config.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/usage/keys.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/usage/messages.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/usage/single/__init__.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/usage/single/config.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/usage/single/single.py +0 -0
- {llm_bridge-2.2.1 → llm_bridge-2.2.3}/usage/workflow.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: LLM-Bridge
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.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
|
|
@@ -14,13 +14,14 @@ class NonStreamClaudeClient(ClaudeClient):
|
|
|
14
14
|
|
|
15
15
|
message = await self.client.beta.messages.create(
|
|
16
16
|
model=self.model,
|
|
17
|
-
max_tokens=self.max_tokens,
|
|
18
|
-
system=self.system,
|
|
19
17
|
messages=serialize(self.messages),
|
|
18
|
+
system=self.system,
|
|
19
|
+
max_tokens=self.max_tokens,
|
|
20
20
|
betas=self.betas,
|
|
21
21
|
tools=self.tools,
|
|
22
22
|
cache_control=self.cache_control,
|
|
23
23
|
thinking=self.thinking,
|
|
24
|
+
speed=self.speed,
|
|
24
25
|
output_config=self.output_config,
|
|
25
26
|
)
|
|
26
27
|
|
|
@@ -34,15 +34,16 @@ class StreamClaudeClient(ClaudeClient):
|
|
|
34
34
|
|
|
35
35
|
stream: AsyncStream[BetaRawMessageStreamEvent] = await self.client.beta.messages.create(
|
|
36
36
|
model=self.model,
|
|
37
|
-
max_tokens=self.max_tokens,
|
|
38
|
-
system=self.system,
|
|
39
37
|
messages=serialize(self.messages),
|
|
38
|
+
system=self.system,
|
|
39
|
+
max_tokens=self.max_tokens,
|
|
40
|
+
stream=True,
|
|
40
41
|
betas=self.betas,
|
|
41
42
|
tools=self.tools,
|
|
42
43
|
cache_control=self.cache_control,
|
|
43
44
|
thinking=self.thinking,
|
|
45
|
+
speed=self.speed,
|
|
44
46
|
output_config=self.output_config,
|
|
45
|
-
stream=True,
|
|
46
47
|
)
|
|
47
48
|
except Exception as e:
|
|
48
49
|
raise_http_exception(e)
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
from collections.abc import AsyncGenerator
|
|
2
|
+
from typing import Literal
|
|
2
3
|
|
|
3
4
|
import anthropic
|
|
4
5
|
from anthropic import Omit
|
|
@@ -23,6 +24,7 @@ class ClaudeClient(ChatClient):
|
|
|
23
24
|
tools: list[BetaToolUnionParam],
|
|
24
25
|
cache_control: BetaCacheControlEphemeralParam,
|
|
25
26
|
thinking: BetaThinkingConfigParam | Omit,
|
|
27
|
+
speed: Literal["standard", "fast"] | Omit,
|
|
26
28
|
output_config: BetaOutputConfigParam | Omit,
|
|
27
29
|
):
|
|
28
30
|
self.model = model
|
|
@@ -34,6 +36,7 @@ class ClaudeClient(ChatClient):
|
|
|
34
36
|
self.tools = tools
|
|
35
37
|
self.cache_control = cache_control
|
|
36
38
|
self.thinking = thinking
|
|
39
|
+
self.speed = speed
|
|
37
40
|
self.output_config = output_config
|
|
38
41
|
|
|
39
42
|
async def generate_non_stream_response(self) -> ChatResponse:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from typing import Any
|
|
1
|
+
from typing import Any, Literal
|
|
2
2
|
|
|
3
3
|
import anthropic
|
|
4
4
|
from anthropic import Omit, transform_schema
|
|
@@ -62,6 +62,11 @@ async def create_claude_client(
|
|
|
62
62
|
thinking = BetaThinkingConfigAdaptiveParam(type="adaptive", display="summarized")
|
|
63
63
|
|
|
64
64
|
betas: list[AnthropicBetaParam] | Omit = omit
|
|
65
|
+
speed: Literal["standard", "fast"] | Omit = omit
|
|
66
|
+
# Fast mode is a research preview with a separate rate limit; re-enable when it reaches GA
|
|
67
|
+
# if model in ["claude-opus-5-5"]:
|
|
68
|
+
# betas = ["fast-mode-2026-02-01"]
|
|
69
|
+
# speed = "fast"
|
|
65
70
|
|
|
66
71
|
tools: list[BetaToolUnionParam] = []
|
|
67
72
|
if web_search:
|
|
@@ -103,6 +108,7 @@ async def create_claude_client(
|
|
|
103
108
|
tools=tools,
|
|
104
109
|
cache_control=cache_control,
|
|
105
110
|
thinking=thinking,
|
|
111
|
+
speed=speed,
|
|
106
112
|
output_config=output_config,
|
|
107
113
|
)
|
|
108
114
|
else:
|
|
@@ -116,5 +122,6 @@ async def create_claude_client(
|
|
|
116
122
|
tools=tools,
|
|
117
123
|
cache_control=cache_control,
|
|
118
124
|
thinking=thinking,
|
|
125
|
+
speed=speed,
|
|
119
126
|
output_config=output_config,
|
|
120
127
|
)
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -14,8 +14,8 @@ class NonStreamOpenAICompletionClient(OpenAICompletionClient):
|
|
|
14
14
|
logging.info(f"messages: {self.messages}")
|
|
15
15
|
|
|
16
16
|
completion: ChatCompletion = await self.client.chat.completions.create(
|
|
17
|
-
messages=serialize(self.messages),
|
|
18
17
|
model=self.model,
|
|
18
|
+
messages=serialize(self.messages),
|
|
19
19
|
temperature=self.temperature,
|
|
20
20
|
stream=False,
|
|
21
21
|
reasoning_effort=self.reasoning_effort,
|
|
@@ -61,8 +61,8 @@ class StreamOpenAICompletionClient(OpenAICompletionClient):
|
|
|
61
61
|
logging.info(f"messages: {self.messages}")
|
|
62
62
|
|
|
63
63
|
completion: AsyncStream[ChatCompletionChunk] = await self.client.chat.completions.create(
|
|
64
|
-
messages=serialize(self.messages),
|
|
65
64
|
model=self.model,
|
|
65
|
+
messages=serialize(self.messages),
|
|
66
66
|
temperature=self.temperature,
|
|
67
67
|
stream=True,
|
|
68
68
|
stream_options=ChatCompletionStreamOptionsParam(include_usage=True),
|
{llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/client/implementations/openai_responses/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/client/implementations/xai/non_stream_xai_client.py
RENAMED
|
File without changes
|
{llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/client/implementations/xai/stream_xai_client.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/client/model_client/openai_completion_client.py
RENAMED
|
File without changes
|
{llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/client/model_client/openai_responses_client.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/logic/chat_generate/chat_message_converter.py
RENAMED
|
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
|
{llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/logic/message_process/code_file_extensions.py
RENAMED
|
File without changes
|
{llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/logic/message_process/document_processor.py
RENAMED
|
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
|
{llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/type/model_message/openai_completion_message.py
RENAMED
|
File without changes
|
{llm_bridge-2.2.1 → llm_bridge-2.2.3}/llm_bridge/type/model_message/openai_responses_message.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{llm_bridge-2.2.1 → llm_bridge-2.2.3}/tests/logic/chat_generate/model_message_converter/__init__.py
RENAMED
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|