generated from coulomb/repo-seed
Complete activity-core LLM endpoint handoff (LLM-WP-0006)
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:
@@ -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,
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user