feat(mcp): configure OpenCode models per workflow

Add server-side model and variant settings for MCP ingest and query OpenCode jobs. Ingest defaults to openai/gpt-5.5 high, while query defaults to openai/gpt-5.5 minimal, and readiness/status surfaces the active settings.

Persist the settings through the managed service env file and preserve local overrides across start, tools, and token rotations. Remote MCP clients still cannot choose arbitrary models per call.

Validation: python3 -m unittest discover -v; python3 -m py_compile obsidian_wiki/mcp_ingest.py obsidian_wiki/mcp_query.py obsidian_wiki/mcp_server.py scripts/manage_mcp_service.py tests/test_mcp_ingest.py tests/test_mcp_query.py tests/test_mcp_server_remote.py tests/test_mcp_service.py; git diff --check.
This commit is contained in:
Codex
2026-07-05 18:20:06 +00:00
parent e7913d4c6b
commit 3d0203fb9e
11 changed files with 253 additions and 12 deletions
+4
View File
@@ -71,6 +71,8 @@ OBSIDIAN_MCP_INGEST_MAX_CHUNK_BYTES=4194304
OBSIDIAN_MCP_INGEST_MAX_FILES_PER_JOB=10
OBSIDIAN_MCP_OPENCODE_PATH=opencode
OBSIDIAN_MCP_INGEST_OPENCODE_PATH=opencode
OBSIDIAN_MCP_INGEST_OPENCODE_MODEL=openai/gpt-5.5
OBSIDIAN_MCP_INGEST_OPENCODE_VARIANT=high
OBSIDIAN_MCP_INGEST_RUNTIME_ROOT=.runtime/mcp-ingest
# Optional MCP query tools. Default is disabled.
@@ -81,6 +83,8 @@ OBSIDIAN_MCP_INGEST_RUNTIME_ROOT=.runtime/mcp-ingest
# pages. Use OBSIDIAN_MCP_ENABLED_TOOLS=file-assets,query or:
# bash scripts/mcp_service.sh tools enable query
# bash scripts/mcp_service.sh start --enable-query
OBSIDIAN_MCP_QUERY_OPENCODE_MODEL=openai/gpt-5.5
OBSIDIAN_MCP_QUERY_OPENCODE_VARIANT=minimal
OBSIDIAN_MCP_QUERY_MAX_CHARS=8000
OBSIDIAN_MCP_QUERY_RUNTIME_ROOT=.runtime/mcp-query