Skip to content

Commit 8a824b7

Browse files
committed
fix mypy linting
1 parent 92cca5d commit 8a824b7

File tree

8 files changed

+17
-17
lines changed

8 files changed

+17
-17
lines changed
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
99
Example usage (standalone functions with @client decorator):
1010
```python
11-
from litellm.a2a import asend_message
11+
from litellm.a2a_protocol import asend_message
1212
from a2a.types import SendMessageRequest, MessageSendParams
1313
from uuid import uuid4
1414
@@ -31,15 +31,15 @@
3131
3232
Example usage (class-based):
3333
```python
34-
from litellm.a2a import A2AClient
34+
from litellm.a2a_protocol import A2AClient
3535
3636
client = A2AClient(base_url="http://localhost:10001")
3737
response = await client.send_message(request)
3838
```
3939
"""
4040

41-
from litellm.a2a.client import A2AClient
42-
from litellm.a2a.main import (
41+
from litellm.a2a_protocol.client import A2AClient
42+
from litellm.a2a_protocol.main import (
4343
aget_agent_card,
4444
asend_message,
4545
asend_message_streaming,
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class A2AClient:
2626
2727
Example:
2828
```python
29-
from litellm.a2a import A2AClient
29+
from litellm.a2a_protocol import A2AClient
3030
from a2a.types import SendMessageRequest, MessageSendParams
3131
from uuid import uuid4
3232
@@ -68,7 +68,7 @@ def __init__(
6868
async def _get_client(self) -> "A2AClientType":
6969
"""Get or create the underlying A2A client."""
7070
if self._a2a_client is None:
71-
from litellm.a2a.main import create_a2a_client
71+
from litellm.a2a_protocol.main import create_a2a_client
7272

7373
self._a2a_client = await create_a2a_client(
7474
base_url=self.base_url,
@@ -79,7 +79,7 @@ async def _get_client(self) -> "A2AClientType":
7979

8080
async def get_agent_card(self) -> "AgentCard":
8181
"""Fetch the agent card from the server."""
82-
from litellm.a2a.main import aget_agent_card
82+
from litellm.a2a_protocol.main import aget_agent_card
8383

8484
return await aget_agent_card(
8585
base_url=self.base_url,
@@ -91,7 +91,7 @@ async def send_message(
9191
self, request: "SendMessageRequest"
9292
) -> LiteLLMSendMessageResponse:
9393
"""Send a message to the A2A agent."""
94-
from litellm.a2a.main import asend_message
94+
from litellm.a2a_protocol.main import asend_message
9595

9696
a2a_client = await self._get_client()
9797
return await asend_message(a2a_client=a2a_client, request=request)
@@ -100,7 +100,7 @@ async def send_message_streaming(
100100
self, request: "SendStreamingMessageRequest"
101101
) -> AsyncIterator["SendStreamingMessageResponse"]:
102102
"""Send a streaming message to the A2A agent."""
103-
from litellm.a2a.main import asend_message_streaming
103+
from litellm.a2a_protocol.main import asend_message_streaming
104104

105105
a2a_client = await self._get_client()
106106
async for chunk in asend_message_streaming(a2a_client=a2a_client, request=request):
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ async def asend_message(
9191
9292
Example:
9393
```python
94-
from litellm.a2a import asend_message, create_a2a_client
94+
from litellm.a2a_protocol import asend_message, create_a2a_client
9595
from a2a.types import SendMessageRequest, MessageSendParams
9696
from uuid import uuid4
9797
@@ -205,7 +205,7 @@ async def create_a2a_client(
205205
206206
Example:
207207
```python
208-
from litellm.a2a import create_a2a_client, asend_message
208+
from litellm.a2a_protocol import create_a2a_client, asend_message
209209
210210
# Create client once
211211
client = await create_a2a_client(base_url="http://localhost:10001")

litellm/cost_calculator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -939,7 +939,7 @@ def completion_cost( # noqa: PLR0915
939939
CallTypes.asend_message.value,
940940
CallTypes.send_message.value,
941941
):
942-
from litellm.a2a.cost_calculator import A2ACostCalculator
942+
from litellm.a2a_protocol.cost_calculator import A2ACostCalculator
943943

944944
return A2ACostCalculator.calculate_a2a_cost(
945945
litellm_logging_obj=litellm_logging_obj

litellm/proxy/agent_endpoints/a2a_endpoints.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ async def invoke_agent_a2a(
138138
- message/send: Send a message and get a response
139139
- message/stream: Send a message and stream the response
140140
"""
141-
from litellm.a2a import asend_message, create_a2a_client
141+
from litellm.a2a_protocol import asend_message, create_a2a_client
142142
from litellm.proxy.litellm_pre_call_utils import add_litellm_data_to_request
143143
from litellm.proxy.proxy_server import (
144144
general_settings,

tests/agent_tests/test_a2a.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ async def test_asend_message_with_client_decorator():
3232
This tests the LiteLLM logging integration.
3333
"""
3434
litellm._turn_on_debug()
35-
from litellm.a2a import asend_message, create_a2a_client
35+
from litellm.a2a_protocol import asend_message, create_a2a_client
3636

3737
# Create the A2A client first
3838
a2a_client = await create_a2a_client(base_url="http://localhost:10001")
@@ -97,7 +97,7 @@ async def test_a2a_logging_payload():
9797
test_logger = TestA2ALogger()
9898
litellm.callbacks = [test_logger]
9999

100-
from litellm.a2a import asend_message, create_a2a_client
100+
from litellm.a2a_protocol import asend_message, create_a2a_client
101101

102102
# Create the A2A client first
103103
a2a_client = await create_a2a_client(base_url="http://localhost:10001")

tests/test_litellm/proxy/agent_endpoints/test_a2a_endpoints.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,10 @@ async def mock_add_litellm_data(data, **kwargs):
7575
"litellm.proxy.litellm_pre_call_utils.add_litellm_data_to_request",
7676
side_effect=mock_add_litellm_data,
7777
) as mock_add_data, patch(
78-
"litellm.a2a.create_a2a_client",
78+
"litellm.a2a_protocol.create_a2a_client",
7979
new_callable=AsyncMock,
8080
), patch(
81-
"litellm.a2a.asend_message",
81+
"litellm.a2a_protocol.asend_message",
8282
new_callable=AsyncMock,
8383
return_value=mock_response,
8484
), patch(

0 commit comments

Comments
 (0)