[claude] Add vllm-mlx as high-performance local inference backend (#1069) (#1089)
Some checks failed
Tests / lint (push) Has been cancelled
Tests / test (push) Has been cancelled

Co-authored-by: Claude (Opus 4.6) <claude@hermes.local>
Co-committed-by: Claude (Opus 4.6) <claude@hermes.local>
This commit was merged in pull request #1089.
This commit is contained in:
2026-03-23 15:34:13 +00:00
committed by Timmy Time
parent 7fdd532260
commit f2a277f7b5
12 changed files with 350 additions and 77 deletions

View File

@@ -175,9 +175,7 @@ async def test_bridge_run_simple_response():
bridge = MCPBridge(include_gitea=False, include_shell=False)
mock_resp = MagicMock()
mock_resp.json.return_value = {
"message": {"role": "assistant", "content": "Hello!"}
}
mock_resp.json.return_value = {"message": {"role": "assistant", "content": "Hello!"}}
mock_resp.raise_for_status = MagicMock()
mock_client = AsyncMock()
@@ -238,9 +236,7 @@ async def test_bridge_run_with_tool_call():
# Round 2: model returns final text
final_resp = MagicMock()
final_resp.json.return_value = {
"message": {"role": "assistant", "content": "Done with tools!"}
}
final_resp.json.return_value = {"message": {"role": "assistant", "content": "Done with tools!"}}
final_resp.raise_for_status = MagicMock()
mock_client = AsyncMock()
@@ -276,17 +272,13 @@ async def test_bridge_run_unknown_tool():
"message": {
"role": "assistant",
"content": "",
"tool_calls": [
{"function": {"name": "nonexistent", "arguments": {}}}
],
"tool_calls": [{"function": {"name": "nonexistent", "arguments": {}}}],
}
}
tool_call_resp.raise_for_status = MagicMock()
final_resp = MagicMock()
final_resp.json.return_value = {
"message": {"role": "assistant", "content": "OK"}
}
final_resp.json.return_value = {"message": {"role": "assistant", "content": "OK"}}
final_resp.raise_for_status = MagicMock()
mock_client = AsyncMock()
@@ -332,9 +324,7 @@ async def test_bridge_run_max_rounds():
"message": {
"role": "assistant",
"content": "",
"tool_calls": [
{"function": {"name": "loop_tool", "arguments": {}}}
],
"tool_calls": [{"function": {"name": "loop_tool", "arguments": {}}}],
}
}
tool_call_resp.raise_for_status = MagicMock()
@@ -365,9 +355,7 @@ async def test_bridge_run_connection_error():
bridge = MCPBridge(include_gitea=False, include_shell=False)
mock_client = AsyncMock()
mock_client.post = AsyncMock(
side_effect=httpx.ConnectError("Connection refused")
)
mock_client.post = AsyncMock(side_effect=httpx.ConnectError("Connection refused"))
mock_client.aclose = AsyncMock()
bridge._client = mock_client

View File

@@ -9,7 +9,6 @@ import pytest
from timmy.research_triage import (
ActionItem,
_parse_llm_response,
_resolve_label_ids,
_validate_action_item,
create_gitea_issue,
extract_action_items,
@@ -250,7 +249,9 @@ class TestCreateGiteaIssue:
with (
patch("timmy.research_triage.settings") as mock_settings,
patch("timmy.research_triage._resolve_label_ids", new_callable=AsyncMock, return_value=[1]),
patch(
"timmy.research_triage._resolve_label_ids", new_callable=AsyncMock, return_value=[1]
),
patch("timmy.research_triage.httpx.AsyncClient") as mock_cls,
):
mock_settings.gitea_enabled = True
@@ -284,7 +285,9 @@ class TestCreateGiteaIssue:
with (
patch("timmy.research_triage.settings") as mock_settings,
patch("timmy.research_triage._resolve_label_ids", new_callable=AsyncMock, return_value=[]),
patch(
"timmy.research_triage._resolve_label_ids", new_callable=AsyncMock, return_value=[]
),
patch("timmy.research_triage.httpx.AsyncClient") as mock_cls,
):
mock_settings.gitea_enabled = True
@@ -331,7 +334,9 @@ class TestTriageResearchReport:
with (
patch("timmy.research_triage.settings") as mock_settings,
patch("timmy.research_triage._resolve_label_ids", new_callable=AsyncMock, return_value=[]),
patch(
"timmy.research_triage._resolve_label_ids", new_callable=AsyncMock, return_value=[]
),
patch("timmy.research_triage.httpx.AsyncClient") as mock_cls,
):
mock_settings.gitea_enabled = True