Skip to content

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

TypeScript

test(mcp-host): pin the host_binding_mismatch and model_not_allowed classifier arms

Alfredo Lopez610bb0079824
diff --git a/mcp-host/package-lock.json b/mcp-host/package-lock.json
index 8e0efdca6..4fa2d45b5 100644
--- a/mcp-host/package-lock.json
+++ b/mcp-host/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "clerum-mcp-host",
- "version": "0.1.434",
+ "version": "0.1.435",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "clerum-mcp-host",
- "version": "0.1.434",
+ "version": "0.1.435",
"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 08828de5c..3b64c7700 100644
--- a/mcp-host/package.json
+++ b/mcp-host/package.json
@@ -1,6 +1,6 @@
{
"name": "clerum-mcp-host",
- "version": "0.1.434",
+ "version": "0.1.435",
"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/__tests__/codexSubscription.test.ts b/mcp-host/src/llm/__tests__/codexSubscription.test.ts
index c006d263e..938e495dd 100644
--- a/mcp-host/src/llm/__tests__/codexSubscription.test.ts
+++ b/mcp-host/src/llm/__tests__/codexSubscription.test.ts
@@ -776,6 +776,31 @@ describe('CodexSubscriptionProvider', () => {
expect(classified.retryable).toBe(false)
})
+ it('classifies the proxy host-binding and model refusals as terminal', () => {
+ const provider = new CodexSubscriptionProvider('gpt-5.3-codex', deps() as never)
+ const binding = provider.classifyError(
+ new CodexProxyError(
+ 'host_binding_mismatch',
+ 'proxy stream failed with 403 (host_binding_mismatch)'
+ )
+ )
+ expect(binding).toMatchObject({
+ code: LlmErrorCode.AuthenticationFailed,
+ retryable: false,
+ providerCode: 'host_binding_mismatch',
+ })
+ expect(classifyFailoverClass(binding.code, binding.retryable)).toBe('auth')
+
+ const model = provider.classifyError(
+ new CodexProxyError('model_not_allowed', 'proxy stream failed with 403 (model_not_allowed)')
+ )
+ expect(model).toMatchObject({
+ code: LlmErrorCode.ModelNotAvailable,
+ retryable: false,
+ providerCode: 'model_not_allowed',
+ })
+ })
+
it('does not treat a revoked grant as a retryable provider outage', () => {
const provider = new CodexSubscriptionProvider('gpt-5.3-codex', deps() as never)
const revoked = provider.classifyError(new CodexAuthorizeError('no_grant', 'revoked'))
diff --git a/mcp-host/src/llm/__tests__/grokSubscription.test.ts b/mcp-host/src/llm/__tests__/grokSubscription.test.ts
index be46b47b1..73c5ee63a 100644
--- a/mcp-host/src/llm/__tests__/grokSubscription.test.ts
+++ b/mcp-host/src/llm/__tests__/grokSubscription.test.ts
@@ -765,6 +765,19 @@ describe('GrokSubscriptionProvider', () => {
const model = provider.classifyError(new CodexAuthorizeError('model_not_allowed', 'model'))
expect(model).toMatchObject({ code: LlmErrorCode.ModelNotAvailable, retryable: false })
+ const binding = provider.classifyError(
+ new GrokProxyError(
+ 'host_binding_mismatch',
+ 'proxy stream failed with 403 (host_binding_mismatch)'
+ )
+ )
+ expect(binding).toMatchObject({
+ code: LlmErrorCode.AuthenticationFailed,
+ retryable: false,
+ providerCode: 'host_binding_mismatch',
+ })
+ expect(classifyFailoverClass(binding.code, binding.retryable)).toBe('auth')
+
const transient = provider.classifyError(
new CodexAuthorizeError('connection_unavailable', 'catalog unavailable')
)