Skip to content

Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure

TypeScript

fix(control-api): keep the module binding on the body refusal log (R4-L8)

Alfredo Lopez72de1856945c
diff --git a/control-api/package-lock.json b/control-api/package-lock.json
index 33bf8cf7b..8d910ac94 100644
--- a/control-api/package-lock.json
+++ b/control-api/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "clerum-control-api",
- "version": "0.1.693",
+ "version": "0.1.694",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "clerum-control-api",
- "version": "0.1.693",
+ "version": "0.1.694",
"dependencies": {
"@clerum/display-field": "file:../packages/display-field",
"@clerum/grok-provider-attempt-contract": "file:../packages/grok-provider-attempt-contract",
diff --git a/control-api/package.json b/control-api/package.json
index 43245081c..31d5b4cab 100644
--- a/control-api/package.json
+++ b/control-api/package.json
@@ -1,6 +1,6 @@
{
"name": "clerum-control-api",
- "version": "0.1.693",
+ "version": "0.1.694",
"description": "Internal Clerum control plane REST API + UI for managing CRDs and secrets",
"main": "dist/main.js",
"engines": {
diff --git a/control-api/src/routes/mcp-host/llmProviderAttempts.routes.ts b/control-api/src/routes/mcp-host/llmProviderAttempts.routes.ts
index 7804148bc..4818d5839 100644
--- a/control-api/src/routes/mcp-host/llmProviderAttempts.routes.ts
+++ b/control-api/src/routes/mcp-host/llmProviderAttempts.routes.ts
@@ -184,10 +184,11 @@ export function createMcpHostLlmProviderAttemptRoutes(gateway: K8sGateway): Rout
// carry no body and go to the global handler, which logs no body. The log
// carries only the fixed parser `type` and the status: `err.message` of a
// JSON.parse error can quote a fragment of the body. It goes through the
- // request-scoped logger when there is one, so it keeps the correlationId.
+ // request-scoped logger when there is one, so it keeps the correlationId;
+ // that logger lacks this route's module binding, so it is added back.
router.use((err: unknown, req: Request, res: Response, next: NextFunction) => {
const typed = err as { type?: string; status?: number }
- const requestLog = req.log ?? log
+ const requestLog = req.log?.child({ module: 'mcp-host-llm-provider-attempts' }) ?? log
const refuse = (status: number, error: string): void => {
requestLog.warn({ event: 'llm_provider_attempt_body_refused', type: typed.type, status })
res.status(status).json({ error })