Skip to content

Commit 9d2f2ad

Browse files
committed
Merge branch 'development' of ssh://git.biggo.com:222/Funmula/dive-mcp-host into development
2 parents 394c391 + e18a23b commit 9d2f2ad

File tree

2 files changed

+29
-2
lines changed

2 files changed

+29
-2
lines changed

dive_mcp_host/httpd/routers/model_verify.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from pydantic.alias_generators import to_camel
1616

1717
from dive_mcp_host.host.conf import HostConfig, LogConfig
18-
from dive_mcp_host.host.conf.llm import LLMConfig, LLMConfigTypes
18+
from dive_mcp_host.host.conf.llm import LLMConfigTypes
1919
from dive_mcp_host.host.errors import ThreadQueryError
2020
from dive_mcp_host.host.host import DiveMcpHost
2121
from dive_mcp_host.host.tools.misc import TestTool
@@ -399,7 +399,7 @@ async def _check_tools_in_prompt(
399399
class ModelVerifyRequest(BaseModel):
400400
"""Model verify request."""
401401

402-
model_settings: LLMConfig | None = Field(alias="modelSettings", default=None)
402+
model_settings: LLMConfigTypes | None = Field(alias="modelSettings", default=None)
403403

404404

405405
def get_verify_subjects(llm_config: LLMConfigTypes) -> list[VERIFY_SUBJECTS]:

tests/test_providers.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ async def test_host_google(echo_tool_stdio_config: dict[str, ServerConfig]) -> N
189189
@pytest.mark.asyncio
190190
async def test_bedrock(echo_tool_stdio_config: dict[str, ServerConfig]) -> None:
191191
"""Test the host context initialization."""
192+
# claude-3-7-sonnet
192193
if (key_id := environ.get("BEDROCK_ACCESS_KEY_ID")) and (
193194
access_key := environ.get("BEDROCK_SECRET_ACCESS_KEY")
194195
):
@@ -214,6 +215,32 @@ async def test_bedrock(echo_tool_stdio_config: dict[str, ServerConfig]) -> None:
214215

215216
await _run_the_test(config)
216217

218+
# claude-sonnet-4
219+
if (key_id := environ.get("BEDROCK_ACCESS_KEY_ID")) and (
220+
access_key := environ.get("BEDROCK_SECRET_ACCESS_KEY")
221+
):
222+
token = environ.get("BEDROCK_SESSION_TOKEN")
223+
config = HostConfig(
224+
llm=LLMBedrockConfig(
225+
model="us.anthropic.claude-sonnet-4-20250514-v1:0",
226+
model_provider="bedrock",
227+
credentials=Credentials(
228+
access_key_id=SecretStr(key_id),
229+
secret_access_key=SecretStr(access_key),
230+
session_token=SecretStr(token or ""),
231+
),
232+
region="us-east-1",
233+
),
234+
mcp_servers=echo_tool_stdio_config,
235+
)
236+
else:
237+
pytest.skip(
238+
"need environment variable BEDROCK_ACCESS_KEY_ID,"
239+
" BEDROCK_SECRET_ACCESS_KEY, BEDROCK_SESSION_TOKEN to run this test"
240+
)
241+
242+
await _run_the_test(config)
243+
217244

218245
@pytest.mark.asyncio
219246
async def test_mistralai(echo_tool_stdio_config: dict[str, ServerConfig]) -> None:

0 commit comments

Comments
 (0)