Complete activity-core LLM endpoint handoff (LLM-WP-0006)
Some checks failed
CI / test (3.10) (push) Has been cancelled
CI / test (3.11) (push) Has been cancelled
CI / test (3.12) (push) Has been cancelled

Switch the custodian triage default from anthropic/claude-sonnet-4 to
google/gemini-2.5-flash, which advertises structured-output support on
OpenRouter. Tighten the OpenRouter adapter to send strict JSON schema
requests and set provider.require_parameters=true so routing only hits
providers that honor the requested response_format.

Update Kubernetes deploy docs and config for the verified coulombcore
handoff: Containerfile build path, image-pull-policy=Never for smoke
pods, credential-routing notes, and live smoke evidence. Mark
LLM-WP-0006 finished with closure notes from 2026-06-18.
This commit is contained in:
2026-06-19 13:51:12 +02:00
parent 6a0319ee86
commit 90eb39c247
12 changed files with 176 additions and 27 deletions

View File

@@ -100,7 +100,7 @@ def merge_openai_chat_model_params(payload: dict[str, Any], model_params: dict[s
"json_schema": {
"name": "structured_output",
"schema": schema,
"strict": False,
"strict": True,
},
}

View File

@@ -82,6 +82,13 @@ class OpenRouterAdapter(LLMAdapter):
}
if config.model_params:
merge_openai_chat_model_params(payload, config.model_params)
provider_params = config.model_params.get("provider")
if isinstance(provider_params, dict):
payload["provider"] = dict(provider_params)
if _uses_json_schema_response_format(payload):
provider = payload.setdefault("provider", {})
if isinstance(provider, dict):
provider.setdefault("require_parameters", True)
headers = {
"Authorization": f"Bearer {self._api_key}",
@@ -149,3 +156,8 @@ class OpenRouterAdapter(LLMAdapter):
else:
raise
raise last_exc # type: ignore[misc]
def _uses_json_schema_response_format(payload: Dict[str, Any]) -> bool:
response_format = payload.get("response_format")
return isinstance(response_format, dict) and response_format.get("type") == "json_schema"

View File

@@ -16,7 +16,7 @@ from llm_connect.models import LLMResponse, RunConfig
CUSTODIAN_TRIAGE_BALANCED = "custodian-triage-balanced"
DEFAULT_CUSTODIAN_TRIAGE_PROVIDER = "openrouter"
DEFAULT_CUSTODIAN_TRIAGE_MODEL = "anthropic/claude-sonnet-4"
DEFAULT_CUSTODIAN_TRIAGE_MODEL = "google/gemini-2.5-flash"
_RUN_CONFIG_DEFAULTS = RunConfig()

View File

@@ -17,7 +17,7 @@ Usage (programmatic)::
Usage (CLI)::
python -m llm_connect.server --port 8080 --provider openrouter --model anthropic/claude-sonnet-4
python -m llm_connect.server --port 8080 --provider openrouter --model google/gemini-2.5-flash
"""
import argparse