fix/lmstudio-numeric-password-mcp - #172
Open
david-hummingbot wants to merge 5 commits into
Open
Conversation
Ensure all arguments and environment variables are strings.
Refactor to use _hummingbot_mcp_args for argument construction.
Add test for handling numeric credentials in MCP args.
cardosofede
approved these changes
Aug 5, 2026
Greptile SummaryThe PR prevents numeric YAML credentials and other non-string MCP values from failing pydantic-ai stdio server validation.
Confidence Score: 5/5The PR appears safe to merge, with no concrete changed-code failure identified. The reachable MCP configuration builders produce valid argument and environment shapes, and the new coercion aligns their values with the downstream stdio and CLI string contracts.
|
| Filename | Overview |
|---|---|
| condor/acp/pydantic_ai_client.py | Normalizes MCP arguments and environment data to strings before pydantic-ai validation; no reachable regression was identified. |
| handlers/agents/_shared.py | Extracts Hummingbot argument construction and ensures credential-related CLI values are strings. |
| tests/test_agents.py | Adds focused regression coverage proving numeric YAML-style credentials become valid string arguments. |
Reviews (1): Last reviewed commit: "Merge branch 'main' into fix/lmstudio-nu..." | Re-trigger Greptile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
username/password(and related CLI args) to strings when building stdio server configs, so YAML-loaded numeric credentials (e.g.password: 123456) don’t break agent startup.PydanticAIClientby stringifying MCPargs/envbeforeStdioServerParametersvalidation — the failure path used bylmstudio:/ollama:/ other pydantic-ai backends.Root cause
Unquoted numeric passwords in
config.yml(often written bysetup-environment.sh) load asint. Starting an LM Studio (pydantic-ai) session validates MCP args strictly and fails with:StdioServerParameters.args.9 … input_value=123456, input_type=intACP agents don’t hit the same validation, so the bug mainly shows up with local LLMs.
Test plan
servers.local.password: 123456(unquoted) inconfig.yml, restart Condor, start/agentwith LM Studio — session should start (noStdioServerParameterserror)