Skip to content

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

TypeScript

fix(mcp-host): use GrokProxyError options object for pre-dispatch V2 refusals

Alfredo Lopez5e6bf8ebef63
diff --git a/mcp-host/package-lock.json b/mcp-host/package-lock.json
index 5223dec4b..dc5c90bb7 100644
--- a/mcp-host/package-lock.json
+++ b/mcp-host/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "clerum-mcp-host",
- "version": "0.1.465",
+ "version": "0.1.466",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "clerum-mcp-host",
- "version": "0.1.465",
+ "version": "0.1.466",
"license": "SEE LICENSE IN LICENSE",
"dependencies": {
"@anthropic-ai/sdk": "^0.32.0",
diff --git a/mcp-host/package.json b/mcp-host/package.json
index 3ba364fb1..120460319 100644
--- a/mcp-host/package.json
+++ b/mcp-host/package.json
@@ -1,6 +1,6 @@
{
"name": "clerum-mcp-host",
- "version": "0.1.465",
+ "version": "0.1.466",
"description": "MCP Host - reads Host CRD and provides LLM access via OpenAI/Claude",
"main": "dist/main.js",
"engines": {
diff --git a/mcp-host/src/llm/grokLlmProxyClient.ts b/mcp-host/src/llm/grokLlmProxyClient.ts
index 3868c9ac0..0c7a3fbec 100644
--- a/mcp-host/src/llm/grokLlmProxyClient.ts
+++ b/mcp-host/src/llm/grokLlmProxyClient.ts
@@ -128,12 +128,13 @@ export class GrokLlmProxyClient {
// so a request the proxy would refuse never leaves this process (#784).
if ((input.request as { schemaVersion?: string } | null)?.schemaVersion === SCHEMA_VERSION_V2) {
const parsed = parseGrokCompletionRequest(input.request)
- if (!parsed.ok) throw new GrokProxyError('invalid_request', parsed.message, false)
+ if (!parsed.ok)
+ throw new GrokProxyError('invalid_request', parsed.message, { dispatched: false })
if (input.deadlineMs !== undefined && input.deadlineMs !== parsed.value.deadlineMs) {
throw new GrokProxyError(
'invalid_request',
'Grok deadline must match the authorized request',
- false
+ { dispatched: false }
)
}
const envelope = buildGrokProxyEnvelope({
@@ -148,7 +149,7 @@ export class GrokLlmProxyClient {
: envelope.code === 'request_hash_mismatch'
? 'request_hash_mismatch'
: 'invalid_request'
- throw new GrokProxyError(code, envelope.message, false)
+ throw new GrokProxyError(code, envelope.message, { dispatched: false })
}
body = envelope.value
}