Bug: layers_split ignores provider=mock and still calls Gemini during analyze stage
Summary
When calling layers_split via MCP with provider="mock", the tool still attempts a Gemini API call in layer analysis, causing failure in offline/no-key environments.
Environment
- OS: macOS Darwin 21.1.0 (arm64)
- Vulca MCP command:
/Users/liuhaitian/Documents/PHD/2026/upgrade/vulca/.venv/bin/vulca-mcp
- FastMCP client:
fastmcp 3.2.4
- Invocation mode: MCP stdio
Reproduction
- Configure MCP server
vulca.
- Run:
view_image(image_path=".../theory-materiality-practice-diagram.png") (works)
- Run:
layers_split(image_path=".../theory-materiality-practice-diagram.png", output_dir=".../vulca_mcp_demo_layers", mode="sam", provider="mock", tradition="default")
Expected behavior
- With
provider="mock", the whole layers_split pipeline should avoid Gemini dependencies.
- In no-network/no-key setups, either:
- complete successfully using mock/local path, or
- fail fast with a clear message that
provider=mock is not supported for analyze stage.
Actual behavior
- Tool retries Gemini calls and fails with:
litellm.APIConnectionError (offline)
litellm.AuthenticationError (API_KEY_INVALID) when network is available but key invalid
- Output indicates failures in
layers.analyze before split output is produced.
Evidence (trimmed)
Layer analysis failed after 3 attempts: litellm.AuthenticationError: GeminiException ... API_KEY_INVALID
Impact
- Breaks minimal/local-first MCP workflow for decomposition.
provider semantics are unclear/inconsistent from user perspective.
Suggested fix
- Ensure
layers_split(..., provider="mock") passes provider choice through analysis stage.
- Add explicit provider capability matrix in MCP tool docs/response.
- Return structured error with actionable remediation (
missing_api_key, provider_not_supported, etc.) instead of generic pipeline failure.
Bug:
layers_splitignoresprovider=mockand still calls Gemini during analyze stageSummary
When calling
layers_splitvia MCP withprovider="mock", the tool still attempts a Gemini API call in layer analysis, causing failure in offline/no-key environments.Environment
/Users/liuhaitian/Documents/PHD/2026/upgrade/vulca/.venv/bin/vulca-mcpfastmcp3.2.4Reproduction
vulca.view_image(image_path=".../theory-materiality-practice-diagram.png")(works)layers_split(image_path=".../theory-materiality-practice-diagram.png", output_dir=".../vulca_mcp_demo_layers", mode="sam", provider="mock", tradition="default")Expected behavior
provider="mock", the wholelayers_splitpipeline should avoid Gemini dependencies.provider=mockis not supported for analyze stage.Actual behavior
litellm.APIConnectionError(offline)litellm.AuthenticationError(API_KEY_INVALID) when network is available but key invalidlayers.analyzebefore split output is produced.Evidence (trimmed)
Layer analysis failed after 3 attempts: litellm.AuthenticationError: GeminiException ... API_KEY_INVALIDImpact
providersemantics are unclear/inconsistent from user perspective.Suggested fix
layers_split(..., provider="mock")passes provider choice through analysis stage.missing_api_key,provider_not_supported, etc.) instead of generic pipeline failure.