Skip to content

Never stop coding. Free MIT AI gateway: one endpoint, 375 providers (150+ free), 1,400+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 900+ contributors

fix: resolve CI hangs by unref-ing setIntervals and increase E2E timeouts

diegosouzapw11c51500b387
diff --git a/debug-handles.mjs b/debug-handles.mjs
new file mode 100644
index 0000000000..3f224f6b1a
--- /dev/null
+++ b/debug-handles.mjs
@@ -0,0 +1,17 @@
+import process from "node:process";
+import fs from "node:fs";
+
+setTimeout(() => {
+ const activeHandles = process._getActiveHandles();
+ console.log("ACTIVE HANDLES: " + activeHandles.length);
+ activeHandles.forEach((handle, i) => {
+ console.log(`Handle ${i}:`, handle?.constructor?.name);
+ // if it's a timer or socket, let's see more
+ if (handle?.constructor?.name === "Timeout") {
+ console.log(" Timer wrapper:", handle?._onTimeout?.toString().slice(0, 50));
+ }
+ });
+ process.exit(1);
+}, 2000);
+
+await import("./tests/integration/chat-pipeline.test.mjs");
diff --git a/debug-sockets.mjs b/debug-sockets.mjs
new file mode 100644
index 0000000000..345213ebb5
--- /dev/null
+++ b/debug-sockets.mjs
@@ -0,0 +1,14 @@
+import process from "node:process";
+import("./tests/integration/chat-pipeline.test.mjs").then((mod) => {
+ setTimeout(() => {
+ const activeHandles = process._getActiveHandles();
+ console.log("ACTIVE HANDLES: " + activeHandles.length);
+ activeHandles.forEach((handle, i) => {
+ console.log(`Handle ${i}:`, handle?.constructor?.name);
+ if (handle?.constructor?.name === "Socket") {
+ console.log("Socket ports:", handle?.localPort, handle?.remotePort);
+ }
+ });
+ process.exit(1);
+ }, 15000);
+});
diff --git a/debug.log b/debug.log
new file mode 100644
index 0000000000..fbf94da8ed
--- /dev/null
+++ b/debug.log
@@ -0,0 +1,1775 @@
+TAP version 13
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-jTKNWy/storage.sqlite
+# [CREDENTIALS] No external credentials file found, using defaults.
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-jTKNWy/storage.sqlite
+# [SECURITY] API_KEY_SECRET is not set. API key CRC validation is disabled.
+# [DB] Added api_keys.allowed_connections column
+# [DB] Added api_keys.auto_resolve column
+# [DB] Added api_keys.is_active column
+# [DB] Added api_keys.access_schedule column
+# [DB] Added api_keys.max_requests_per_day column
+# [DB] Added api_keys.max_requests_per_minute column
+# [DB] Added api_keys.max_sessions column
+# [23:37:04.405] INFO: [sse] 📥 POST /v1/chat/completions | openai/gpt-4o-mini | 1 msgs
+# module: "sse"
+# tag: "HTTP"
+# method: "POST"
+# path: "/v1/chat/completions | openai/gpt-4o-mini | 1 msgs"
+# [23:37:04.406] DEBUG: [sse] API Key: sk-m...d970
+# module: "sse"
+# tag: "AUTH"
+# [23:37:04.415] INFO: [sse] Provider: openai, Model: gpt-4o-mini
+# module: "sse"
+# tag: "ROUTING"
+# 🛡️ [RATE-LIMIT] Loaded 0 explicit + 1 auto-enabled + 0 custom rpm/tpm protection(s)
+# [23:37:04.419] DEBUG: [sse] openai | total connections: 1, excludeId: none
+# module: "sse"
+# tag: "AUTH"
+# [23:37:04.419] DEBUG: [sse] openai | available: 1/1
+# module: "sse"
+# tag: "AUTH"
+# [23:37:04.420] INFO: [sse] Using openai account: d92ece8b...
+# module: "sse"
+# tag: "AUTH"
+# [23:37:04.436] DEBUG: [sse] openai → openai | stream=false
+# module: "sse"
+# tag: "FORMAT"
+# [23:37:04.443] DEBUG: [sse] OPENAI | gpt-4o-mini | 1 msgs
+# module: "sse"
+# tag: "REQUEST"
+# [20:37] 📊 [USAGE] OPENAI | in=4 | out=2 | account=d92ece8b...
+# [23:37:04.511] DEBUG: [sse] Stored response for gpt-4o-mini (6 tokens)
+# module: "sse"
+# tag: "CACHE"
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-jTKNWy/storage.sqlite
+# Subtest: chat pipeline handles OpenAI passthrough with valid API key auth
+ok 1 - chat pipeline handles OpenAI passthrough with valid API key auth
+ ---
+ duration_ms: 240.858479
+ type: 'test'
+ ...
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-jTKNWy/storage.sqlite
+# [23:37:04.649] INFO: [sse] 📥 POST /v1/chat/completions | claude/claude-3-5-sonnet-20241022 | 1 msgs
+# module: "sse"
+# tag: "HTTP"
+# method: "POST"
+# path: "/v1/chat/completions | claude/claude-3-5-sonnet-20241022 | 1 msgs"
+# [23:37:04.650] DEBUG: [sse] No API key provided (local mode)
+# module: "sse"
+# tag: "AUTH"
+# [20:37] 📊 [USAGE] CLAUDE | in=10 | out=4 | account=c5a7d3b2...
+# [23:37:04.660] INFO: [sse] Provider: claude, Model: claude-3-5-sonnet-20241022
+# module: "sse"
+# tag: "ROUTING"
+# [23:37:04.661] DEBUG: [sse] claude | total connections: 1, excludeId: none
+# module: "sse"
+# tag: "AUTH"
+# [23:37:04.661] DEBUG: [sse] claude | available: 1/1
+# module: "sse"
+# tag: "AUTH"
+# [23:37:04.661] INFO: [sse] Using claude account: c5a7d3b2...
+# module: "sse"
+# tag: "AUTH"
+# [23:37:04.663] DEBUG: [sse] openai → claude | stream=false
+# module: "sse"
+# tag: "FORMAT"
+# [23:37:04.666] DEBUG: [sse] CLAUDE | claude-3-5-sonnet-20241022 | 1 msgs
+# module: "sse"
+# tag: "REQUEST"
+# [23:37:04.672] DEBUG: [sse] Stored response for claude-3-5-sonnet-20241022 (14 tokens)
+# module: "sse"
+# tag: "CACHE"
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-jTKNWy/storage.sqlite
+# Subtest: chat pipeline translates OpenAI requests to Claude and returns OpenAI-shaped responses
+ok 2 - chat pipeline translates OpenAI requests to Claude and returns OpenAI-shaped responses
+ ---
+ duration_ms: 153.337563
+ type: 'test'
+ ...
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-jTKNWy/storage.sqlite
+# [23:37:04.800] INFO: [sse] 📥 POST /v1/chat/completions | gemini/gemini-2.5-flash | 1 msgs
+# module: "sse"
+# tag: "HTTP"
+# method: "POST"
+# path: "/v1/chat/completions | gemini/gemini-2.5-flash | 1 msgs"
+# [23:37:04.800] DEBUG: [sse] No API key provided (local mode)
+# module: "sse"
+# tag: "AUTH"
+# [20:37] 📊 [USAGE] GEMINI | in=5 | out=7 | account=51322177...
+# [23:37:04.803] INFO: [sse] Provider: gemini, Model: gemini-2.5-flash
+# module: "sse"
+# tag: "ROUTING"
+# [23:37:04.804] DEBUG: [sse] gemini | total connections: 1, excludeId: none
+# module: "sse"
+# tag: "AUTH"
+# [23:37:04.804] DEBUG: [sse] gemini | available: 1/1
+# module: "sse"
+# tag: "AUTH"
+# [23:37:04.804] INFO: [sse] Using gemini account: 51322177...
+# module: "sse"
+# tag: "AUTH"
+# [23:37:04.806] DEBUG: [sse] openai → gemini | stream=false
+# module: "sse"
+# tag: "FORMAT"
+# [23:37:04.809] DEBUG: [sse] GEMINI | gemini-2.5-flash | 1 msgs
+# module: "sse"
+# tag: "REQUEST"
+# [23:37:04.814] DEBUG: [sse] Stored response for gemini-2.5-flash (12 tokens)
+# module: "sse"
+# tag: "CACHE"
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-jTKNWy/storage.sqlite
+# Subtest: chat pipeline translates OpenAI requests to Gemini and returns OpenAI-shaped responses
+ok 3 - chat pipeline translates OpenAI requests to Gemini and returns OpenAI-shaped responses
+ ---
+ duration_ms: 141.730313
+ type: 'test'
+ ...
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-jTKNWy/storage.sqlite
+# [23:37:04.937] INFO: [sse] 📥 POST /v1/messages | openai/gpt-4o-mini | 1 msgs
+# module: "sse"
+# tag: "HTTP"
+# method: "POST"
+# path: "/v1/messages | openai/gpt-4o-mini | 1 msgs"
+# [23:37:04.937] DEBUG: [sse] No API key provided (local mode)
+# module: "sse"
+# tag: "AUTH"
+# [20:37] 📊 [USAGE] OPENAI | in=4 | out=2 | account=2c7bd399...
+# [23:37:04.939] INFO: [sse] Provider: openai, Model: gpt-4o-mini
+# module: "sse"
+# tag: "ROUTING"
+# [23:37:04.940] DEBUG: [sse] openai | total connections: 1, excludeId: none
+# module: "sse"
+# tag: "AUTH"
+# [23:37:04.940] DEBUG: [sse] openai | available: 1/1
+# module: "sse"
+# tag: "AUTH"
+# [23:37:04.941] INFO: [sse] Using openai account: 2c7bd399...
+# module: "sse"
+# tag: "AUTH"
+# [23:37:04.942] DEBUG: [sse] claude → openai | stream=false
+# module: "sse"
+# tag: "FORMAT"
+# [23:37:04.944] DEBUG: [sse] OPENAI | gpt-4o-mini | 2 msgs
+# module: "sse"
+# tag: "REQUEST"
+# [23:37:04.947] DEBUG: [sse] Stored response for gpt-4o-mini (6 tokens)
+# module: "sse"
+# tag: "CACHE"
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-jTKNWy/storage.sqlite
+# Subtest: chat pipeline translates Claude-format requests into OpenAI upstream and back to Claude
+ok 4 - chat pipeline translates Claude-format requests into OpenAI upstream and back to Claude
+ ---
+ duration_ms: 133.00343
+ type: 'test'
+ ...
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-jTKNWy/storage.sqlite
+# [23:37:05.072] INFO: [sse] 📥 POST /v1/chat/completions | claude/claude-sonnet-4-6 | 1 msgs
+# module: "sse"
+# tag: "HTTP"
+# method: "POST"
+# path: "/v1/chat/completions | claude/claude-sonnet-4-6 | 1 msgs"
+# [23:37:05.072] DEBUG: [sse] No API key provided (local mode)
+# module: "sse"
+# tag: "AUTH"
+# [20:37:05] 📊 [USAGE] CLAUDE | in=0 | out=3 | account=5cfec526...
+# [20:37:05] 🌊 [STREAM] CLAUDE | claude-sonnet-4-6 | 25ms | complete
+# [23:37:05.074] INFO: [sse] Provider: claude, Model: claude-sonnet-4-6
+# module: "sse"
+# tag: "ROUTING"
+# [23:37:05.076] DEBUG: [sse] claude | total connections: 1, excludeId: none
+# module: "sse"
+# tag: "AUTH"
+# [23:37:05.076] DEBUG: [sse] claude | available: 1/1
+# module: "sse"
+# tag: "AUTH"
+# [23:37:05.076] INFO: [sse] Using claude account: 5cfec526...
+# module: "sse"
+# tag: "AUTH"
+# [23:37:05.077] DEBUG: [sse] openai → claude | stream=true
+# module: "sse"
+# tag: "FORMAT"
+# [23:37:05.078] DEBUG: [sse] CLAUDE | claude-sonnet-4-6 | 1 msgs
+# module: "sse"
+# tag: "REQUEST"
+# [23:37:05.080] DEBUG: [sse] Translation mode: claude → openai
+# module: "sse"
+# tag: "STREAM"
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-jTKNWy/storage.sqlite
+# Subtest: chat pipeline converts Claude SSE streams into OpenAI SSE output
+ok 5 - chat pipeline converts Claude SSE streams into OpenAI SSE output
+ ---
+ duration_ms: 153.585214
+ type: 'test'
+ ...
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-jTKNWy/storage.sqlite
+# [DB] Added api_keys.allowed_connections column
+# [DB] Added api_keys.auto_resolve column
+# [DB] Added api_keys.is_active column
+# [DB] Added api_keys.access_schedule column
+# [DB] Added api_keys.max_requests_per_day column
+# [DB] Added api_keys.max_requests_per_minute column
+# [DB] Added api_keys.max_sessions column
+# [23:37:05.229] INFO: [sse] 📥 POST /v1/chat/completions | openai/gpt-4o-mini | 1 msgs
+# module: "sse"
+# tag: "HTTP"
+# method: "POST"
+# path: "/v1/chat/completions | openai/gpt-4o-mini | 1 msgs"
+# [23:37:05.230] DEBUG: [sse] API Key: does...xist
+# module: "sse"
+# tag: "AUTH"
+# [23:37:05.239] WARN: [sse] API key not found or invalid (must be created in API Manager)
+# module: "sse"
+# tag: "AUTH"
+# [23:37:05.240] WARN: [sse] Invalid JSON body
+# module: "sse"
+# tag: "CHAT"
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-jTKNWy/storage.sqlite
+# Subtest: chat pipeline rejects invalid API keys and malformed JSON bodies
+ok 6 - chat pipeline rejects invalid API keys and malformed JSON bodies
+ ---
+ duration_ms: 137.638739
+ type: 'test'
+ ...
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-jTKNWy/storage.sqlite
+# [23:37:05.338] INFO: [sse] 📥 POST /v1/chat/completions | openai/gpt-4o-mini | 1 msgs
+# module: "sse"
+# tag: "HTTP"
+# method: "POST"
+# path: "/v1/chat/completions | openai/gpt-4o-mini | 1 msgs"
+# [23:37:05.338] DEBUG: [sse] No API key provided (local mode)
+# module: "sse"
+# tag: "AUTH"
+# [23:37:05.338] WARN: [sse] Missing API key while REQUIRE_API_KEY=true
+# module: "sse"
+# tag: "AUTH"
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-jTKNWy/storage.sqlite
+# Subtest: chat pipeline rejects requests without a bearer key when strict API key mode is enabled
+ok 7 - chat pipeline rejects requests without a bearer key when strict API key mode is enabled
+ ---
+ duration_ms: 126.083827
+ type: 'test'
+ ...
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-jTKNWy/storage.sqlite
+# [23:37:05.464] INFO: [sse] 📥 POST /v1/chat/completions | undefined | 1 msgs
+# module: "sse"
+# tag: "HTTP"
+# method: "POST"
+# path: "/v1/chat/completions | undefined | 1 msgs"
+# [23:37:05.464] DEBUG: [sse] No API key provided (local mode)
+# module: "sse"
+# tag: "AUTH"
+# [23:37:05.464] WARN: [sse] Missing model
+# module: "sse"
+# tag: "CHAT"
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-jTKNWy/storage.sqlite
+# Subtest: chat pipeline returns 400 when the model field is omitted
+ok 8 - chat pipeline returns 400 when the model field is omitted
+ ---
+ duration_ms: 121.287276
+ type: 'test'
+ ...
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-jTKNWy/storage.sqlite
+# [23:37:05.622] DEBUG: [sse] Accept: text/event-stream header → overriding stream=true (body had no stream field)
+# module: "sse"
+# tag: "STREAM"
+# [23:37:05.622] INFO: [sse] 📥 POST /v1/chat/completions | openai/gpt-4o-mini | 1 msgs
+# module: "sse"
+# tag: "HTTP"
+# method: "POST"
+# path: "/v1/chat/completions | openai/gpt-4o-mini | 1 msgs"
+# [23:37:05.623] DEBUG: [sse] No API key provided (local mode)
+# module: "sse"
+# tag: "AUTH"
+# [20:37:05] 📊 [USAGE] OPENAI | in=2062 | out=6 | account=2cb832e8... (estimated)
+# [20:37:05] 🌊 [STREAM] OPENAI | gpt-4o-mini | 8ms | complete
+# [23:37:05.626] INFO: [sse] Provider: openai, Model: gpt-4o-mini
+# module: "sse"
+# tag: "ROUTING"
+# [23:37:05.628] DEBUG: [sse] openai | total connections: 1, excludeId: none
+# module: "sse"
+# tag: "AUTH"
+# [23:37:05.628] DEBUG: [sse] openai | available: 1/1
+# module: "sse"
+# tag: "AUTH"
+# [23:37:05.628] INFO: [sse] Using openai account: 2cb832e8...
+# module: "sse"
+# tag: "AUTH"
+# [23:37:05.630] DEBUG: [sse] openai → openai | stream=true
+# module: "sse"
+# tag: "FORMAT"
+# [23:37:05.631] DEBUG: [sse] OPENAI | gpt-4o-mini | 1 msgs
+# module: "sse"
+# tag: "REQUEST"
+# [23:37:05.632] DEBUG: [sse] Standard passthrough mode
+# module: "sse"
+# tag: "STREAM"
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-jTKNWy/storage.sqlite
+# Subtest: chat pipeline treats Accept text/event-stream as streaming mode and returns a session header
+ok 9 - chat pipeline treats Accept text/event-stream as streaming mode and returns a session header
+ ---
+ duration_ms: 150.696127
+ type: 'test'
+ ...
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-jTKNWy/storage.sqlite
+# [20:37] 📊 [USAGE] OPENAI | in=4 | out=2 | account=ae22a379...
+# [23:37:05.767] INFO: [sse] 📥 POST /v1/chat/completions | local-router | 1 msgs
+# module: "sse"
+# tag: "HTTP"
+# method: "POST"
+# path: "/v1/chat/completions | local-router | 1 msgs"
+# [23:37:05.767] DEBUG: [sse] No API key provided (local mode)
+# module: "sse"
+# tag: "AUTH"
+# [23:37:05.768] INFO: [sse] Combo "local-router" [priority] with 1 models
+# module: "sse"
+# tag: "CHAT"
+# [23:37:05.770] INFO: [sse] priority with nested resolution: 1 total models
+# module: "sse"
+# tag: "COMBO"
+# [23:37:05.772] DEBUG: [sse] openai | total connections: 1, excludeId: none
+# module: "sse"
+# tag: "AUTH"
+# [23:37:05.772] DEBUG: [sse] openai | available: 1/1
+# module: "sse"
+# tag: "AUTH"
+# [23:37:05.772] INFO: [sse] Trying model 1/1: openai/gpt-4o-mini
+# module: "sse"
+# tag: "COMBO"
+# [23:37:05.773] INFO: [sse] Provider: openai, Model: gpt-4o-mini
+# module: "sse"
+# tag: "ROUTING"
+# [23:37:05.774] DEBUG: [sse] openai | total connections: 1, excludeId: none
+# module: "sse"
+# tag: "AUTH"
+# [23:37:05.774] DEBUG: [sse] openai | available: 1/1
+# module: "sse"
+# tag: "AUTH"
+# [23:37:05.774] INFO: [sse] Using openai account: ae22a379...
+# module: "sse"
+# tag: "AUTH"
+# [23:37:05.776] DEBUG: [sse] openai → openai | stream=false
+# module: "sse"
+# tag: "FORMAT"
+# [23:37:05.776] DEBUG: [sse] OPENAI | gpt-4o-mini | 1 msgs
+# module: "sse"
+# tag: "REQUEST"
+# [23:37:05.780] DEBUG: [sse] Stored response for gpt-4o-mini (6 tokens)
+# module: "sse"
+# tag: "CACHE"
+# [23:37:05.783] INFO: [sse] Model openai/gpt-4o-mini succeeded (12ms, 0 fallbacks)
+# module: "sse"
+# tag: "COMBO"
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-jTKNWy/storage.sqlite
+# Subtest: chat pipeline supports local mode without Authorization on explicit combos
+ok 10 - chat pipeline supports local mode without Authorization on explicit combos
+ ---
+ duration_ms: 144.671066
+ type: 'test'
+ ...
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-jTKNWy/storage.sqlite
+# [DB] Added api_keys.allowed_connections column
+# [DB] Added api_keys.auto_resolve column
+# [DB] Added api_keys.is_active column
+# [DB] Added api_keys.access_schedule column
+# [DB] Added api_keys.max_requests_per_day column
+# [DB] Added api_keys.max_requests_per_minute column
+# [DB] Added api_keys.max_sessions column
+# [23:37:05.916] INFO: [sse] 📥 POST /v1/chat/completions | openai/gpt-4o-mini | 1 msgs
+# module: "sse"
+# tag: "HTTP"
+# method: "POST"
+# path: "/v1/chat/completions | openai/gpt-4o-mini | 1 msgs"
+# [23:37:05.916] DEBUG: [sse] API Key: sk-m...63cc
+# module: "sse"
+# tag: "AUTH"
+# [20:37] 📊 [USAGE] OPENAI | in=4 | out=2 | account=015388a8...
+# [23:37:05.920] INFO: [sse] Provider: openai, Model: gpt-4o-mini
+# module: "sse"
+# tag: "ROUTING"
+# [23:37:05.921] DEBUG: [sse] openai | total connections: 1, excludeId: none
+# module: "sse"
+# tag: "AUTH"
+# [23:37:05.921] DEBUG: [sse] openai | available: 1/1
+# module: "sse"
+# tag: "AUTH"
+# [23:37:05.921] INFO: [sse] Using openai account: 015388a8...
+# module: "sse"
+# tag: "AUTH"
+# [23:37:05.922] DEBUG: [sse] openai → openai | stream=false
+# module: "sse"
+# tag: "FORMAT"
+# [23:37:05.923] DEBUG: [sse] OPENAI | gpt-4o-mini | 1 msgs
+# module: "sse"
+# tag: "REQUEST"
+# [23:37:05.929] DEBUG: [sse] Stored response for gpt-4o-mini (6 tokens)
+# module: "sse"
+# tag: "CACHE"
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-jTKNWy/storage.sqlite
+# Subtest: chat pipeline honors noLog by redacting persisted call log payloads
+ok 11 - chat pipeline honors noLog by redacting persisted call log payloads
+ ---
+ duration_ms: 175.46898
+ type: 'test'
+ ...
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-jTKNWy/storage.sqlite
+# [23:37:06.057] INFO: [sse] 📥 POST /v1/chat/completions | openai/gpt-4o-mini | 1 msgs
+# module: "sse"
+# tag: "HTTP"
+# method: "POST"
+# path: "/v1/chat/completions | openai/gpt-4o-mini | 1 msgs"
+# [23:37:06.057] DEBUG: [sse] No API key provided (local mode)
+# module: "sse"
+# tag: "AUTH"
+# [23:37:06.097] INFO: [sse] Provider: openai, Model: gpt-4o-mini
+# module: "sse"
+# tag: "ROUTING"
+# [23:37:06.098] DEBUG: [sse] openai | total connections: 0, excludeId: none
+# module: "sse"
+# tag: "AUTH"
+# [23:37:06.098] DEBUG: [sse] openai | all connections (incl inactive): 0
+# module: "sse"
+# tag: "AUTH"
+# [23:37:06.098] WARN: [sse] No credentials for openai
+# module: "sse"
+# tag: "AUTH"
+# [23:37:06.098] ERROR: [sse] No credentials for provider: openai
+# module: "sse"
+# tag: "AUTH"
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-jTKNWy/storage.sqlite
+# Subtest: chat pipeline returns current no-credentials contract when no provider connection exists
+ok 12 - chat pipeline returns current no-credentials contract when no provider connection exists
+ ---
+ duration_ms: 139.59565
+ type: 'test'
+ ...
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-jTKNWy/storage.sqlite
+# [23:37:06.226] INFO: [sse] 📥 POST /v1/chat/completions | openai/gpt-4o-mini | 1 msgs
+# module: "sse"
+# tag: "HTTP"
+# method: "POST"
+# path: "/v1/chat/completions | openai/gpt-4o-mini | 1 msgs"
+# [23:37:06.226] DEBUG: [sse] No API key provided (local mode)
+# module: "sse"
+# tag: "AUTH"
+# [23:37:06.229] INFO: [sse] Provider: openai, Model: gpt-4o-mini
+# module: "sse"
+# tag: "ROUTING"
+# [23:37:06.229] WARN: [sse] openai/gpt-4o-mini is in cooldown, rejecting request
+# module: "sse"
+# tag: "AVAILABILITY"
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-jTKNWy/storage.sqlite
+# Subtest: chat pipeline returns 503 when the requested model is temporarily unavailable
+ok 13 - chat pipeline returns 503 when the requested model is temporarily unavailable
+ ---
+ duration_ms: 130.400878
+ type: 'test'
+ ...
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-jTKNWy/storage.sqlite
+# [23:37:06.404] INFO: [sse] 📥 POST /v1/chat/completions | openai/gpt-4o-mini | 1 msgs
+# module: "sse"
+# tag: "HTTP"
+# method: "POST"
+# path: "/v1/chat/completions | openai/gpt-4o-mini | 1 msgs"
+# [23:37:06.404] DEBUG: [sse] No API key provided (local mode)
+# module: "sse"
+# tag: "AUTH"
+# [ERROR] [500]: provider exploded
+# ❌ openai [500]: [500]: provider exploded
+# [23:37:06.407] INFO: [sse] Provider: openai, Model: gpt-4o-mini
+# module: "sse"
+# tag: "ROUTING"
+# [23:37:06.409] DEBUG: [sse] openai | total connections: 1, excludeId: none
+# module: "sse"
+# tag: "AUTH"
+# [23:37:06.409] DEBUG: [sse] openai | available: 1/1
+# module: "sse"
+# tag: "AUTH"
+# [23:37:06.409] INFO: [sse] Using openai account: 5fafd15d...
+# module: "sse"
+# tag: "AUTH"
+# [23:37:06.412] DEBUG: [sse] openai → openai | stream=false
+# module: "sse"
+# tag: "FORMAT"
+# [23:37:06.415] DEBUG: [sse] OPENAI | gpt-4o-mini | 1 msgs
+# module: "sse"
+# tag: "REQUEST"
+# [23:37:06.450] WARN: [sse] Account 5fafd15d... unavailable (500), trying fallback
+# module: "sse"
+# tag: "AUTH"
+# [23:37:06.451] DEBUG: [sse] openai | total connections: 1, excludeId: 5fafd15d-d14e-49d1-8f7a-4c98ffc15b88
+# module: "sse"
+# tag: "AUTH"
+# [23:37:06.451] DEBUG: [sse] openai | available: 0/1
+# module: "sse"
+# tag: "AUTH"
+# [23:37:06.451] DEBUG: [sse] → 5fafd15d | excluded rateLimited until 2026-04-06T23:37:09.447Z
+# module: "sse"
+# tag: "AUTH"
+# [23:37:06.451] WARN: [sse] openai | all 1 active accounts rate limited (reset after 3s) | lastErrorCode=500.0, lastError=[500]: provider exploded
+# module: "sse"
+# tag: "AUTH"
+# [23:37:06.451] WARN: [sse] [openai/gpt-4o-mini] [500]: provider exploded (reset after 3s)
+# module: "sse"
+# tag: "CHAT"
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-jTKNWy/storage.sqlite
+# Subtest: chat pipeline surfaces upstream 500 responses as structured errors
+ok 14 - chat pipeline surfaces upstream 500 responses as structured errors
+ ---
+ duration_ms: 221.19967
+ type: 'test'
+ ...
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-jTKNWy/storage.sqlite
+# [23:37:06.624] INFO: [sse] 📥 POST /v1/chat/completions | openai/gpt-4o-mini | 1 msgs
+# module: "sse"
+# tag: "HTTP"
+# method: "POST"
+# path: "/v1/chat/completions | openai/gpt-4o-mini | 1 msgs"
+# [23:37:06.624] DEBUG: [sse] No API key provided (local mode)
+# module: "sse"
+# tag: "AUTH"
+# [23:37:06.628] INFO: [sse] Provider: openai, Model: gpt-4o-mini
+# module: "sse"
+# tag: "ROUTING"
+# [23:37:06.629] DEBUG: [sse] openai | total connections: 1, excludeId: none
+# module: "sse"
+# tag: "AUTH"
+# [23:37:06.629] DEBUG: [sse] openai | available: 1/1
+# module: "sse"
+# tag: "AUTH"
+# [23:37:06.630] INFO: [sse] Using openai account: 520c2927...
+# module: "sse"
+# tag: "AUTH"
+# [23:37:06.632] DEBUG: [sse] openai → openai | stream=false
+# module: "sse"
+# tag: "FORMAT"
+# [23:37:06.633] DEBUG: [sse] OPENAI | gpt-4o-mini | 1 msgs
+# module: "sse"
+# tag: "REQUEST"
+# [23:37:06.635] DEBUG: [sse] 429 intra-retry 1/2 on https://api.openai.com/v1/chat/completions — waiting 0ms
+# module: "sse"
+# tag: "RETRY"
+# [23:37:06.638] DEBUG: [sse] 429 intra-retry 2/2 on https://api.openai.com/v1/chat/completions — waiting 0ms
+# module: "sse"
+# tag: "RETRY"
+# [provider] Node 520c2927-8996-4455-aab8-9bd9b2849476 rate limited (429) - Next available at 2026-04-06T23:37:36.643Z
+# [ERROR] [429]: Rate limit exceeded. Your quota will reset after 30s.
+# [23:37:06.649] INFO: [sse] 520c2927 terminal status=credits_exhausted, skipping cooldown overwrite
+# module: "sse"
+# tag: "AUTH"
+# [23:37:06.650] WARN: [sse] Account 520c2927... unavailable (429), trying fallback
+# module: "sse"
+# tag: "AUTH"
+# [23:37:06.650] DEBUG: [sse] openai | total connections: 1, excludeId: 520c2927-8996-4455-aab8-9bd9b2849476
+# module: "sse"
+# tag: "AUTH"
+# [23:37:06.651] DEBUG: [sse] openai | available: 0/1
+# module: "sse"
+# tag: "AUTH"
+# [23:37:06.651] DEBUG: [sse] → 520c2927 | excluded rateLimited until 2026-04-06T23:37:36.643Z
+# module: "sse"
+# tag: "AUTH"
+# [23:37:06.651] WARN: [sse] openai | all 1 active accounts rate limited (reset after 30s) | lastErrorCode=429.0, lastError=Rate limit exceeded. Your quota will reset after 3
+# module: "sse"
+# tag: "AUTH"
+# [23:37:06.651] INFO: [sse] openai/gpt-4o-mini marked unavailable — all accounts exhausted (HTTP 429)
+# module: "sse"
+# tag: "AVAILABILITY"
+# [23:37:06.651] WARN: [sse] [openai/gpt-4o-mini] [429]: Rate limit exceeded. Your quota will reset after 30s. (reset after 30s)
+# module: "sse"
+# tag: "CHAT"
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-jTKNWy/storage.sqlite
+# Subtest: chat pipeline returns 429 with Retry-After when the upstream rate-limits the only account
+ok 15 - chat pipeline returns 429 with Retry-After when the upstream rate-limits the only account
+ ---
+ duration_ms: 222.318358
+ type: 'test'
+ ...
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-jTKNWy/storage.sqlite
+# [23:37:06.835] INFO: [sse] 📥 POST /v1/chat/completions | openai/gpt-4o-mini | 1 msgs
+# module: "sse"
+# tag: "HTTP"
+# method: "POST"
+# path: "/v1/chat/completions | openai/gpt-4o-mini | 1 msgs"
+# [23:37:06.836] DEBUG: [sse] No API key provided (local mode)
+# module: "sse"
+# tag: "AUTH"
+# [ERROR] [504]: upstream timed out
+# ❌ openai [504]: [504]: upstream timed out
+# [23:37:06.838] INFO: [sse] Provider: openai, Model: gpt-4o-mini
+# module: "sse"
+# tag: "ROUTING"
+# [23:37:06.839] DEBUG: [sse] openai | total connections: 1, excludeId: none
+# module: "sse"
+# tag: "AUTH"
+# [23:37:06.839] DEBUG: [sse] openai | available: 1/1
+# module: "sse"
+# tag: "AUTH"
+# [23:37:06.839] INFO: [sse] Using openai account: f2cfd6ee...
+# module: "sse"
+# tag: "AUTH"
+# [23:37:06.840] DEBUG: [sse] openai → openai | stream=false
+# module: "sse"
+# tag: "FORMAT"
+# [23:37:06.841] DEBUG: [sse] OPENAI | gpt-4o-mini | 1 msgs
+# module: "sse"
+# tag: "REQUEST"
+# [23:37:06.842] WARN: [sse] Fetch timeout after 600000ms on https://api.openai.com/v1/chat/completions
+# module: "sse"
+# tag: "TIMEOUT"
+# [23:37:06.845] WARN: [sse] Account f2cfd6ee... unavailable (504), trying fallback
+# module: "sse"
+# tag: "AUTH"
+# [23:37:06.845] DEBUG: [sse] openai | total connections: 1, excludeId: f2cfd6ee-5788-445d-95ab-a42c4755c98c
+# module: "sse"
+# tag: "AUTH"
+# [23:37:06.845] DEBUG: [sse] openai | available: 0/1
+# module: "sse"
+# tag: "AUTH"
+# [23:37:06.845] DEBUG: [sse] → f2cfd6ee | excluded rateLimited until 2026-04-06T23:37:09.844Z
+# module: "sse"
+# tag: "AUTH"
+# [23:37:06.845] WARN: [sse] openai | all 1 active accounts rate limited (reset after 3s) | lastErrorCode=504.0, lastError=[504]: upstream timed out
+# module: "sse"
+# tag: "AUTH"
+# [23:37:06.845] WARN: [sse] [openai/gpt-4o-mini] [504]: upstream timed out (reset after 3s)
+# module: "sse"
+# tag: "CHAT"
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-jTKNWy/storage.sqlite
+# Subtest: chat pipeline maps upstream timeouts to 504 responses
+ok 16 - chat pipeline maps upstream timeouts to 504 responses
+ ---
+ duration_ms: 169.592617
+ type: 'test'
+ ...
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-jTKNWy/storage.sqlite
+# [DB] Added api_keys.allowed_connections column
+# [DB] Added api_keys.auto_resolve column
+# [DB] Added api_keys.is_active column
+# [DB] Added api_keys.access_schedule column
+# [DB] Added api_keys.max_requests_per_day column
+# [DB] Added api_keys.max_requests_per_minute column
+# [DB] Added api_keys.max_sessions column
+# [23:37:06.978] INFO: [sse] 📥 POST /v1/chat/completions | openai/gpt-4o-mini | 1 msgs
+# module: "sse"
+# tag: "HTTP"
+# method: "POST"
+# path: "/v1/chat/completions | openai/gpt-4o-mini | 1 msgs"
+# [23:37:06.978] DEBUG: [sse] API Key: sk-m...b45a
+# module: "sse"
+# tag: "AUTH"
+# [20:37] 📊 [USAGE] OPENAI | in=4 | out=2 | account=10055017...
+# [23:37:06.980] INFO: [sse] Provider: openai, Model: gpt-4o-mini
+# module: "sse"
+# tag: "ROUTING"
+# [23:37:06.981] DEBUG: [sse] openai | total connections: 1, excludeId: none
+# module: "sse"
+# tag: "AUTH"
+# [23:37:06.981] DEBUG: [sse] openai | available: 1/1
+# module: "sse"
+# tag: "AUTH"
+# [23:37:06.982] INFO: [sse] Using openai account: 10055017...
+# module: "sse"
+# tag: "AUTH"
+# [23:37:06.983] DEBUG: [sse] openai → openai | stream=false
+# module: "sse"
+# tag: "FORMAT"
+# [23:37:06.984] DEBUG: [sse] Injected 1 memories for key=b87f32c4-2259-496c-bea6-e3a84ee2ceeb
+# module: "sse"
+# tag: "MEMORY"
+# [23:37:06.985] DEBUG: [sse] OPENAI | gpt-4o-mini | 2 msgs
+# module: "sse"
+# tag: "REQUEST"
+# [23:37:06.991] DEBUG: [sse] Stored response for gpt-4o-mini (6 tokens)
+# module: "sse"
+# tag: "CACHE"
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-jTKNWy/storage.sqlite
+# Subtest: chat pipeline injects memory context before sending the upstream request
+ok 17 - chat pipeline injects memory context before sending the upstream request
+ ---
+ duration_ms: 146.457203
+ type: 'test'
+ ...
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-jTKNWy/storage.sqlite
+# [DB] Added api_keys.allowed_connections column
+# [DB] Added api_keys.auto_resolve column
+# [DB] Added api_keys.is_active column
+# [DB] Added api_keys.access_schedule column
+# [DB] Added api_keys.max_requests_per_day column
+# [DB] Added api_keys.max_requests_per_minute column
+# [DB] Added api_keys.max_sessions column
+# [23:37:07.121] INFO: [sse] 📥 POST /v1/chat/completions | openai/gpt-4o-mini | 1 msgs
+# module: "sse"
+# tag: "HTTP"
+# method: "POST"
+# path: "/v1/chat/completions | openai/gpt-4o-mini | 1 msgs"
+# [23:37:07.121] DEBUG: [sse] API Key: sk-m...e321
+# module: "sse"
+# tag: "AUTH"
+# [20:37] 📊 [USAGE] OPENAI | in=6 | out=4 | account=d2c071f5...
+# [23:37:07.123] INFO: [sse] Provider: openai, Model: gpt-4o-mini
+# module: "sse"
+# tag: "ROUTING"
+# [23:37:07.124] DEBUG: [sse] openai | total connections: 1, excludeId: none
+# module: "sse"
+# tag: "AUTH"
+# [23:37:07.124] DEBUG: [sse] openai | available: 1/1
+# module: "sse"
+# tag: "AUTH"
+# [23:37:07.124] INFO: [sse] Using openai account: d2c071f5...
+# module: "sse"
+# tag: "AUTH"
+# [23:37:07.125] DEBUG: [sse] openai → openai | stream=false
+# module: "sse"
+# tag: "FORMAT"
+# [23:37:07.126] DEBUG: [sse] Injected 1 skills
+# module: "sse"
+# tag: "SKILLS"
+# [23:37:07.128] DEBUG: [sse] OPENAI | gpt-4o-mini | 1 msgs
+# module: "sse"
+# tag: "REQUEST"
+# [23:37:07.136] DEBUG: [sse] Stored response for gpt-4o-mini (10 tokens)
+# module: "sse"
+# tag: "CACHE"
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-jTKNWy/storage.sqlite
+# Subtest: chat pipeline injects skills into tools and intercepts tool calls with skill output
+ok 18 - chat pipeline injects skills into tools and intercepts tool calls with skill output
+ ---
+ duration_ms: 143.886786
+ type: 'test'
+ ...
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-jTKNWy/storage.sqlite
+# [23:37:07.253] INFO: [sse] 📥 POST /v1/chat/completions | openai/gpt-4o-mini | 1 msgs
+# module: "sse"
+# tag: "HTTP"
+# method: "POST"
+# path: "/v1/chat/completions | openai/gpt-4o-mini | 1 msgs"
+# [23:37:07.253] DEBUG: [sse] No API key provided (local mode)
+# module: "sse"
+# tag: "AUTH"
+# [ERROR] [500]: first account failed
+# ❌ openai [500]: [500]: first account failed
+# [20:37] 📊 [USAGE] OPENAI | in=4 | out=2 | account=f16327df...
+# [23:37:07.255] INFO: [sse] Provider: openai, Model: gpt-4o-mini
+# module: "sse"
+# tag: "ROUTING"
+# [23:37:07.255] DEBUG: [sse] openai | total connections: 2, excludeId: none
+# module: "sse"
+# tag: "AUTH"
+# [23:37:07.255] DEBUG: [sse] openai | available: 2/2
+# module: "sse"
+# tag: "AUTH"
+# [23:37:07.256] INFO: [sse] Using openai account: dce45848...
+# module: "sse"
+# tag: "AUTH"
+# [23:37:07.257] DEBUG: [sse] openai → openai | stream=false
+# module: "sse"
+# tag: "FORMAT"
+# [23:37:07.257] DEBUG: [sse] OPENAI | gpt-4o-mini | 1 msgs
+# module: "sse"
+# tag: "REQUEST"
+# [23:37:07.262] WARN: [sse] Account dce45848... unavailable (500), trying fallback
+# module: "sse"
+# tag: "AUTH"
+# [23:37:07.263] DEBUG: [sse] openai | total connections: 2, excludeId: dce45848-4780-4192-afd1-e53ca9b89c71
+# module: "sse"
+# tag: "AUTH"
+# [23:37:07.263] DEBUG: [sse] openai | available: 1/2
+# module: "sse"
+# tag: "AUTH"
+# [23:37:07.263] DEBUG: [sse] → dce45848 | excluded rateLimited until 2026-04-06T23:37:10.261Z
+# module: "sse"
+# tag: "AUTH"
+# [23:37:07.263] INFO: [sse] Using openai account: f16327df...
+# module: "sse"
+# tag: "AUTH"
+# [23:37:07.264] DEBUG: [sse] openai → openai | stream=false
+# module: "sse"
+# tag: "FORMAT"
+# [23:37:07.264] DEBUG: [sse] OPENAI | gpt-4o-mini | 1 msgs
+# module: "sse"
+# tag: "REQUEST"
+# [23:37:07.267] DEBUG: [sse] Stored response for gpt-4o-mini (6 tokens)
+# module: "sse"
+# tag: "CACHE"
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-jTKNWy/storage.sqlite
+# Subtest: chat pipeline falls back to the next account after a provider failure
+ok 19 - chat pipeline falls back to the next account after a provider failure
+ ---
+ duration_ms: 131.562397
+ type: 'test'
+ ...
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-jTKNWy/storage.sqlite
+# [ERROR] [503]: openai combo miss
+# ❌ openai [503]: [503]: openai combo miss
+# [23:37:07.383] INFO: [sse] 📥 POST /v1/chat/completions | combo-fallback | 1 msgs
+# module: "sse"
+# tag: "HTTP"
+# method: "POST"
+# path: "/v1/chat/completions | combo-fallback | 1 msgs"
+# [23:37:07.383] DEBUG: [sse] No API key provided (local mode)
+# module: "sse"
+# tag: "AUTH"
+# [23:37:07.383] INFO: [sse] Combo "combo-fallback" [priority] with 2 models
+# module: "sse"
+# tag: "CHAT"
+# [23:37:07.384] INFO: [sse] priority with nested resolution: 2 total models
+# module: "sse"
+# tag: "COMBO"
+# [23:37:07.385] DEBUG: [sse] openai | total connections: 1, excludeId: none
+# module: "sse"
+# tag: "AUTH"
+# [23:37:07.385] DEBUG: [sse] openai | available: 1/1
+# module: "sse"
+# tag: "AUTH"
+# [23:37:07.385] INFO: [sse] Trying model 1/2: openai/gpt-4o-mini
+# module: "sse"
+# tag: "COMBO"
+# [23:37:07.386] INFO: [sse] Provider: openai, Model: gpt-4o-mini
+# module: "sse"
+# tag: "ROUTING"
+# [23:37:07.386] DEBUG: [sse] openai | total connections: 1, excludeId: none
+# module: "sse"
+# tag: "AUTH"
+# [23:37:07.386] DEBUG: [sse] openai | available: 1/1
+# module: "sse"
+# tag: "AUTH"
+# [23:37:07.386] INFO: [sse] Using openai account: 4c323792...
+# module: "sse"
+# tag: "AUTH"
+# [23:37:07.387] DEBUG: [sse] openai → openai | stream=false
+# module: "sse"
+# tag: "FORMAT"
+# [23:37:07.388] DEBUG: [sse] OPENAI | gpt-4o-mini | 1 msgs
+# module: "sse"
+# tag: "REQUEST"
+# [23:37:07.395] WARN: [sse] Account 4c323792... unavailable (503), trying fallback
+# module: "sse"
+# tag: "AUTH"
+# [23:37:07.395] DEBUG: [sse] openai | total connections: 1, excludeId: 4c323792-707c-4d82-b957-1d5e8da61b5c
+# module: "sse"
+# tag: "AUTH"
+# [23:37:07.395] DEBUG: [sse] openai | available: 0/1
+# module: "sse"
+# tag: "AUTH"
+# [23:37:07.395] DEBUG: [sse] → 4c323792 | excluded rateLimited until 2026-04-06T23:37:10.394Z
+# module: "sse"
+# tag: "AUTH"
+# [23:37:07.395] WARN: [sse] openai | all 1 active accounts rate limited (reset after 3s) | lastErrorCode=503.0, lastError=[503]: openai combo miss
+# module: "sse"
+# tag: "AUTH"
+# [23:37:07.395] INFO: [sse] openai/gpt-4o-mini marked unavailable — all accounts exhausted (HTTP 503)
+# module: "sse"
+# tag: "AVAILABILITY"
+# [23:37:07.395] WARN: [sse] [openai/gpt-4o-mini] [503]: openai combo miss (reset after 3s)
+# module: "sse"
+# tag: "CHAT"
+# [23:37:07.396] WARN: [sse] Model openai/gpt-4o-mini failed, trying next
+# module: "sse"
+# tag: "COMBO"
+# status: 503
+# [23:37:07.396] INFO: [sse] Waiting 3000ms before fallback to next model
+# module: "sse"
+# tag: "COMBO"
+# [20:37] 📊 [USAGE] CLAUDE | in=10 | out=4 | account=0c1621a2...
+# [23:37:10.400] DEBUG: [sse] claude | total connections: 1, excludeId: none
+# module: "sse"
+# tag: "AUTH"
+# [23:37:10.400] DEBUG: [sse] claude | available: 1/1
+# module: "sse"
+# tag: "AUTH"
+# [23:37:10.400] INFO: [sse] Trying model 2/2: claude/claude-3-5-sonnet-20241022
+# module: "sse"
+# tag: "COMBO"
+# [23:37:10.401] INFO: [sse] Provider: claude, Model: claude-3-5-sonnet-20241022
+# module: "sse"
+# tag: "ROUTING"
+# [23:37:10.402] DEBUG: [sse] claude | total connections: 1, excludeId: none
+# module: "sse"
+# tag: "AUTH"
+# [23:37:10.402] DEBUG: [sse] claude | available: 1/1
+# module: "sse"
+# tag: "AUTH"
+# [23:37:10.402] INFO: [sse] Using claude account: 0c1621a2...
+# module: "sse"
+# tag: "AUTH"
+# [23:37:10.404] DEBUG: [sse] openai → claude | stream=false
+# module: "sse"
+# tag: "FORMAT"
+# [23:37:10.405] DEBUG: [sse] CLAUDE | claude-3-5-sonnet-20241022 | 1 msgs
+# module: "sse"
+# tag: "REQUEST"
+# [23:37:10.409] DEBUG: [sse] Stored response for claude-3-5-sonnet-20241022 (14 tokens)
+# module: "sse"
+# tag: "CACHE"
+# [23:37:10.411] INFO: [sse] Model claude/claude-3-5-sonnet-20241022 succeeded (3027ms, 0 fallbacks)
+# module: "sse"
+# tag: "COMBO"
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-jTKNWy/storage.sqlite
+# Subtest: chat pipeline falls back across combo models when the first provider fails
+ok 20 - chat pipeline falls back across combo models when the first provider fails
+ ---
+ duration_ms: 3215.387755
+ type: 'test'
+ ...
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-jTKNWy/storage.sqlite
+# [23:37:10.671] INFO: [sse] 📥 POST /v1/chat/completions | openai/gpt-4o-mini | 1 msgs
+# module: "sse"
+# tag: "HTTP"
+# method: "POST"
+# path: "/v1/chat/completions | openai/gpt-4o-mini | 1 msgs"
+# [23:37:10.671] DEBUG: [sse] No API key provided (local mode)
+# module: "sse"
+# tag: "AUTH"
+# [23:37:10.672] INFO: [sse] 📥 POST /v1/chat/completions | openai/gpt-4o-mini | 1 msgs
+# module: "sse"
+# tag: "HTTP"
+# method: "POST"
+# path: "/v1/chat/completions | openai/gpt-4o-mini | 1 msgs"
+# [23:37:10.672] DEBUG: [sse] No API key provided (local mode)
+# module: "sse"
+# tag: "AUTH"
+# [23:37:10.674] INFO: [sse] Provider: openai, Model: gpt-4o-mini
+# module: "sse"
+# tag: "ROUTING"
+# [23:37:10.675] DEBUG: [sse] openai | total connections: 1, excludeId: none
+# module: "sse"
+# tag: "AUTH"
+# [23:37:10.675] DEBUG: [sse] openai | available: 1/1
+# module: "sse"
+# tag: "AUTH"
+# [23:37:10.675] INFO: [sse] Using openai account: 32de68a2...
+# module: "sse"
+# tag: "AUTH"
+# [23:37:10.677] DEBUG: [sse] openai → openai | stream=false
+# module: "sse"
+# tag: "FORMAT"
+# [23:37:10.678] DEBUG: [sse] OPENAI | gpt-4o-mini | 1 msgs
+# module: "sse"
+# tag: "REQUEST"
+# [23:37:10.679] INFO: [sse] Provider: openai, Model: gpt-4o-mini
+# module: "sse"
+# tag: "ROUTING"
+# [23:37:10.680] DEBUG: [sse] openai | total connections: 1, excludeId: none
+# module: "sse"
+# tag: "AUTH"
+# [23:37:10.680] DEBUG: [sse] openai | available: 1/1
+# module: "sse"
+# tag: "AUTH"
+# [23:37:10.680] INFO: [sse] Using openai account: 32de68a2...
+# module: "sse"
+# tag: "AUTH"
+# [23:37:10.681] DEBUG: [sse] openai → openai | stream=false
+# module: "sse"
+# tag: "FORMAT"
+# [23:37:10.682] DEBUG: [sse] OPENAI | gpt-4o-mini | 1 msgs
+# module: "sse"
+# tag: "REQUEST"
+# [20:37] 📊 [USAGE] OPENAI | in=4 | out=2 | account=32de68a2...
+# [20:37] 📊 [USAGE] OPENAI | in=4 | out=2 | account=32de68a2...
+# [23:37:10.704] DEBUG: [sse] Joined in-flight request hash=f467c6e15f3cb6e2
+# module: "sse"
+# tag: "DEDUP"
+# [23:37:10.707] DEBUG: [sse] Stored response for gpt-4o-mini (6 tokens)
+# module: "sse"
+# tag: "CACHE"
+# [23:37:10.709] DEBUG: [sse] Stored response for gpt-4o-mini (6 tokens)
+# module: "sse"
+# tag: "CACHE"
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-jTKNWy/storage.sqlite
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# Subtest: chat pipeline deduplicates concurrent identical non-stream requests
+ok 21 - chat pipeline deduplicates concurrent identical non-stream requests
+ ---
+ duration_ms: 227.367687
+ type: 'test'
+ ...
+# ACTIVE HANDLES: 2
+# Handle 0: Socket
+# Socket _peername: undefined
+# Socket remoteAddress: undefined
+# Handle 1: Socket
+# Socket _peername: undefined
+# Socket remoteAddress: undefined
+# WAITING UNTIL EVERYTHING CLEARS...
+1..21
+# tests 21
+# suites 0
+# pass 21
+# fail 0
+# cancelled 0
+# skipped 0
+# todo 0
+# duration_ms 36094.10465
diff --git a/debug2.log b/debug2.log
new file mode 100644
index 0000000000..bac9284c45
--- /dev/null
+++ b/debug2.log
@@ -0,0 +1,339 @@
+TAP version 13
+# Subtest: Chat Pipeline — handleSingleModelChat decomposition
+ # Subtest: should define resolveModelOrError helper
+ ok 1 - should define resolveModelOrError helper
+ ---
+ duration_ms: 2.870676
+ type: 'test'
+ ...
+ # Subtest: should define checkPipelineGates helper
+ ok 2 - should define checkPipelineGates helper
+ ---
+ duration_ms: 0.539959
+ type: 'test'
+ ...
+ # Subtest: should define executeChatWithBreaker helper
+ ok 3 - should define executeChatWithBreaker helper
+ ---
+ duration_ms: 0.540611
+ type: 'test'
+ ...
+ # Subtest: should keep cost accounting in the core chat pipeline
+ ok 4 - should keep cost accounting in the core chat pipeline
+ ---
+ duration_ms: 0.583888
+ type: 'test'
+ ...
+ # Subtest: handleSingleModelChat should use resolveModelOrError
+ ok 5 - handleSingleModelChat should use resolveModelOrError
+ ---
+ duration_ms: 0.395358
+ type: 'test'
+ ...
+ # Subtest: handleSingleModelChat should use checkPipelineGates
+ ok 6 - handleSingleModelChat should use checkPipelineGates
+ ---
+ duration_ms: 0.725771
+ type: 'test'
+ ...
+ # Subtest: handleSingleModelChat should use executeChatWithBreaker
+ ok 7 - handleSingleModelChat should use executeChatWithBreaker
+ ---
+ duration_ms: 0.384009
+ type: 'test'
+ ...
+ # Subtest: chatCore should record cost for both non-streaming and streaming responses
+ ok 8 - chatCore should record cost for both non-streaming and streaming responses
+ ---
+ duration_ms: 0.717301
+ type: 'test'
+ ...
+ 1..8
+ok 1 - Chat Pipeline — handleSingleModelChat decomposition
+ ---
+ duration_ms: 12.510313
+ type: 'suite'
+ ...
+# Subtest: Chat Pipeline — combo fallback support
+ # Subtest: should import handleComboChat
+ ok 1 - should import handleComboChat
+ ---
+ duration_ms: 0.683569
+ type: 'test'
+ ...
+ # Subtest: should delegate to handleSingleModelChat for each combo model
+ ok 2 - should delegate to handleSingleModelChat for each combo model
+ ---
+ duration_ms: 0.903143
+ type: 'test'
+ ...
+ # Subtest: should check model availability before attempting combo models
+ ok 3 - should check model availability before attempting combo models
+ ---
+ duration_ms: 0.37494
+ type: 'test'
+ ...
+ 1..3
+ok 2 - Chat Pipeline — combo fallback support
+ ---
+ duration_ms: 2.526966
+ type: 'suite'
+ ...
+# Subtest: Chat Pipeline — circuit breaker integration
+ # Subtest: should import CircuitBreakerOpenError
+ ok 1 - should import CircuitBreakerOpenError
+ ---
+ duration_ms: 0.500942
+ type: 'test'
+ ...
+ # Subtest: should handle CircuitBreakerOpenError with retry-after
+ ok 2 - should handle CircuitBreakerOpenError with retry-after
+ ---
+ duration_ms: 0.262275
+ type: 'test'
+ ...
+ # Subtest: should reject requests when circuit is open
+ ok 3 - should reject requests when circuit is open
+ ---
+ duration_ms: 0.399071
+ type: 'test'
+ ...
+ 1..3
+ok 3 - Chat Pipeline — circuit breaker integration
+ ---
+ duration_ms: 1.532005
+ type: 'suite'
+ ...
+# Subtest: DI Container — container.ts
+ # Subtest: should export a container singleton
+ ok 1 - should export a container singleton
+ ---
+ duration_ms: 293.16418
+ type: 'test'
+ ...
+ # Subtest: should register and resolve a custom service
+ ok 2 - should register and resolve a custom service
+ ---
+ duration_ms: 9.047061
+ type: 'test'
+ ...
+ # Subtest: should return cached singleton on repeated resolve
+ ok 3 - should return cached singleton on repeated resolve
+ ---
+ duration_ms: 2.700355
+ type: 'test'
+ ...
+ # Subtest: should throw on resolving unregistered service
+ ok 4 - should throw on resolving unregistered service
+ ---
+ duration_ms: 3.280776
+ type: 'test'
+ ...
+ # Subtest: should have default registrations
+ ok 5 - should have default registrations
+ ---
+ duration_ms: 2.960963
+ type: 'test'
+ ...
+ # Subtest: should support re-registration (overwrite)
+ ok 6 - should support re-registration (overwrite)
+ ---
+ duration_ms: 2.683065
+ type: 'test'
+ ...
+ 1..6
+ok 4 - DI Container — container.ts
+ ---
+ duration_ms: 314.82733
+ type: 'suite'
+ ...
+# [Plugins] Registered "test-logger" (priority: 10, enabled: true)
+# Subtest: Plugin Architecture — plugins/index.ts
+ # Subtest: should register and list plugins
+ ok 1 - should register and list plugins
+ ---
+ duration_ms: 7.470741
+ type: 'test'
+ ...
+# [Plugins] Registered "low" (priority: 200, enabled: true)
+# [Plugins] Registered "high" (priority: 1, enabled: true)
+# [Plugins] Registered "mid" (priority: 50, enabled: true)
+ # Subtest: should sort plugins by priority
+ ok 2 - should sort plugins by priority
+ ---
+ duration_ms: 3.51882
+ type: 'test'
+ ...
+# [Plugins] Registered "first" (priority: 1, enabled: true)
+# [Plugins] Registered "second" (priority: 2, enabled: true)
+ # Subtest: should run onRequest hooks in order
+ ok 3 - should run onRequest hooks in order
+ ---
+ duration_ms: 2.940782
+ type: 'test'
+ ...
+# [Plugins] Registered "blocker" (priority: 1, enabled: true)
+# [Plugins] Registered "never-runs" (priority: 2, enabled: true)
+# [Plugins] Request blocked by "blocker"
+ # Subtest: should support request blocking
+ ok 4 - should support request blocking
+ ---
+ duration_ms: 3.293988
+ type: 'test'
+ ...
+# [Plugins] Registered "toggle-me" (priority: 100, enabled: true)
+ # Subtest: should enable/disable plugins at runtime
+ ok 5 - should enable/disable plugins at runtime
+ ---
+ duration_ms: 2.784824
+ type: 'test'
+ ...
+# [Plugins] Registered "removable" (priority: 100, enabled: true)
+ # Subtest: should unregister plugins
+ ok 6 - should unregister plugins
+ ---
+ duration_ms: 2.608295
+ type: 'test'
+ ...
+# [Plugins] Registered "response-modifier" (priority: 100, enabled: true)
+ # Subtest: should run onResponse hooks
+ ok 7 - should run onResponse hooks
+ ---
+ duration_ms: 2.746361
+ type: 'test'
+ ...
+# [Plugins] Registered "error-handler" (priority: 100, enabled: true)
+# [Plugins] Error recovered by "error-handler"
+ # Subtest: should run onError hooks and allow recovery
+ ok 8 - should run onError hooks and allow recovery
+ ---
+ duration_ms: 2.899465
+ type: 'test'
+ ...
+ # Subtest: should return null from onError if no recovery
+ ok 9 - should return null from onError if no recovery
+ ---
+ duration_ms: 2.313171
+ type: 'test'
+ ...
+ 1..9
+ok 5 - Plugin Architecture — plugins/index.ts
+ ---
+ duration_ms: 31.770504
+ type: 'suite'
+ ...
+# Subtest: Prompt Template Versioning — prompts.ts module existence
+ # Subtest: prompts.ts should exist
+ ok 1 - prompts.ts should exist
+ ---
+ duration_ms: 0.369635
+ type: 'test'
+ ...
+ # Subtest: should export CRUD functions
+ ok 2 - should export CRUD functions
+ ---
+ duration_ms: 0.391134
+ type: 'test'
+ ...
+ # Subtest: should define PromptTemplate interface
+ ok 3 - should define PromptTemplate interface
+ ---
+ duration_ms: 0.333598
+ type: 'test'
+ ...
+ # Subtest: should use content hashing for deduplication
+ ok 4 - should use content hashing for deduplication
+ ---
+ duration_ms: 0.31716
+ type: 'test'
+ ...
+ 1..4
+ok 6 - Prompt Template Versioning — prompts.ts module existence
+ ---
+ duration_ms: 1.752975
+ type: 'suite'
+ ...
+# Subtest: Eval Scheduler — scheduler.ts module existence
+ # Subtest: scheduler.ts should exist
+ ok 1 - scheduler.ts should exist
+ ---
+ duration_ms: 0.347059
+ type: 'test'
+ ...
+ # Subtest: should export scheduling functions
+ ok 2 - should export scheduling functions
+ ---
+ duration_ms: 0.582836
+ type: 'test'
+ ...
+ # Subtest: should define ScheduledEval and EvalRunResult types
+ ok 3 - should define ScheduledEval and EvalRunResult types
+ ---
+ duration_ms: 0.459196
+ type: 'test'
+ ...
+ # Subtest: should have pluggable output provider
+ ok 4 - should have pluggable output provider
+ ---
+ duration_ms: 0.310267
+ type: 'test'
+ ...
+ 1..4
+ok 7 - Eval Scheduler — scheduler.ts module existence
+ ---
+ duration_ms: 1.961338
+ type: 'suite'
+ ...
+# Subtest: Migration System — files exist
+ # Subtest: migrationRunner.ts should exist
+ ok 1 - migrationRunner.ts should exist
+ ---
+ duration_ms: 0.381312
+ type: 'test'
+ ...
+ # Subtest: 001_initial_schema.sql should exist
+ ok 2 - 001_initial_schema.sql should exist
+ ---
+ duration_ms: 0.248336
+ type: 'test'
+ ...
+ # Subtest: core.ts should reference migration runner
+ ok 3 - core.ts should reference migration runner
+ ---
+ duration_ms: 0.542947
+ type: 'test'
+ ...
+ 1..3
+ok 8 - Migration System — files exist
+ ---
+ duration_ms: 1.448447
+ type: 'suite'
+ ...
+# Subtest: CORS — centralized configuration
+ # Subtest: shared/utils/cors.ts should exist
+ ok 1 - shared/utils/cors.ts should exist
+ ---
+ duration_ms: 0.374376
+ type: 'test'
+ ...
+ # Subtest: should export CORS_HEADERS and CORS_ORIGIN
+ ok 2 - should export CORS_HEADERS and CORS_ORIGIN
+ ---
+ duration_ms: 0.390035
+ type: 'test'
+ ...
+ 1..2
+ok 9 - CORS — centralized configuration
+ ---
+ duration_ms: 0.962465
+ type: 'suite'
+ ...
+1..9
+# tests 42
+# suites 9
+# pass 42
+# fail 0
+# cancelled 0
+# skipped 0
+# todo 0
+# duration_ms 869.387894
diff --git a/debug3.log b/debug3.log
new file mode 100644
index 0000000000..1f0e7424f2
--- /dev/null
+++ b/debug3.log
@@ -0,0 +1,1772 @@
+TAP version 13
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-5DubiT/storage.sqlite
+# [CREDENTIALS] No external credentials file found, using defaults.
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-5DubiT/storage.sqlite
+# [SECURITY] API_KEY_SECRET is not set. API key CRC validation is disabled.
+# [DB] Added api_keys.allowed_connections column
+# [DB] Added api_keys.auto_resolve column
+# [DB] Added api_keys.is_active column
+# [DB] Added api_keys.access_schedule column
+# [DB] Added api_keys.max_requests_per_day column
+# [DB] Added api_keys.max_requests_per_minute column
+# [DB] Added api_keys.max_sessions column
+# [23:40:30.381] INFO: [sse] 📥 POST /v1/chat/completions | openai/gpt-4o-mini | 1 msgs
+# module: "sse"
+# tag: "HTTP"
+# method: "POST"
+# path: "/v1/chat/completions | openai/gpt-4o-mini | 1 msgs"
+# [23:40:30.382] DEBUG: [sse] API Key: sk-m...01c2
+# module: "sse"
+# tag: "AUTH"
+# [23:40:30.392] INFO: [sse] Provider: openai, Model: gpt-4o-mini
+# module: "sse"
+# tag: "ROUTING"
+# 🛡️ [RATE-LIMIT] Loaded 0 explicit + 1 auto-enabled + 0 custom rpm/tpm protection(s)
+# [23:40:30.396] DEBUG: [sse] openai | total connections: 1, excludeId: none
+# module: "sse"
+# tag: "AUTH"
+# [23:40:30.396] DEBUG: [sse] openai | available: 1/1
+# module: "sse"
+# tag: "AUTH"
+# [23:40:30.397] INFO: [sse] Using openai account: 4782b395...
+# module: "sse"
+# tag: "AUTH"
+# [23:40:30.415] DEBUG: [sse] openai → openai | stream=false
+# module: "sse"
+# tag: "FORMAT"
+# [23:40:30.425] DEBUG: [sse] OPENAI | gpt-4o-mini | 1 msgs
+# module: "sse"
+# tag: "REQUEST"
+# [20:40] 📊 [USAGE] OPENAI | in=4 | out=2 | account=4782b395...
+# [23:40:30.493] DEBUG: [sse] Stored response for gpt-4o-mini (6 tokens)
+# module: "sse"
+# tag: "CACHE"
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-5DubiT/storage.sqlite
+# Subtest: chat pipeline handles OpenAI passthrough with valid API key auth
+ok 1 - chat pipeline handles OpenAI passthrough with valid API key auth
+ ---
+ duration_ms: 279.06402
+ type: 'test'
+ ...
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-5DubiT/storage.sqlite
+# [23:40:30.652] INFO: [sse] 📥 POST /v1/chat/completions | claude/claude-3-5-sonnet-20241022 | 1 msgs
+# module: "sse"
+# tag: "HTTP"
+# method: "POST"
+# path: "/v1/chat/completions | claude/claude-3-5-sonnet-20241022 | 1 msgs"
+# [23:40:30.652] DEBUG: [sse] No API key provided (local mode)
+# module: "sse"
+# tag: "AUTH"
+# [20:40] 📊 [USAGE] CLAUDE | in=10 | out=4 | account=9ced487d...
+# [23:40:30.656] INFO: [sse] Provider: claude, Model: claude-3-5-sonnet-20241022
+# module: "sse"
+# tag: "ROUTING"
+# [23:40:30.658] DEBUG: [sse] claude | total connections: 1, excludeId: none
+# module: "sse"
+# tag: "AUTH"
+# [23:40:30.658] DEBUG: [sse] claude | available: 1/1
+# module: "sse"
+# tag: "AUTH"
+# [23:40:30.658] INFO: [sse] Using claude account: 9ced487d...
+# module: "sse"
+# tag: "AUTH"
+# [23:40:30.660] DEBUG: [sse] openai → claude | stream=false
+# module: "sse"
+# tag: "FORMAT"
+# [23:40:30.664] DEBUG: [sse] CLAUDE | claude-3-5-sonnet-20241022 | 1 msgs
+# module: "sse"
+# tag: "REQUEST"
+# [23:40:30.671] DEBUG: [sse] Stored response for claude-3-5-sonnet-20241022 (14 tokens)
+# module: "sse"
+# tag: "CACHE"
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-5DubiT/storage.sqlite
+# Subtest: chat pipeline translates OpenAI requests to Claude and returns OpenAI-shaped responses
+ok 2 - chat pipeline translates OpenAI requests to Claude and returns OpenAI-shaped responses
+ ---
+ duration_ms: 203.116864
+ type: 'test'
+ ...
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-5DubiT/storage.sqlite
+# [23:40:30.852] INFO: [sse] 📥 POST /v1/chat/completions | gemini/gemini-2.5-flash | 1 msgs
+# module: "sse"
+# tag: "HTTP"
+# method: "POST"
+# path: "/v1/chat/completions | gemini/gemini-2.5-flash | 1 msgs"
+# [23:40:30.852] DEBUG: [sse] No API key provided (local mode)
+# module: "sse"
+# tag: "AUTH"
+# [20:40] 📊 [USAGE] GEMINI | in=5 | out=7 | account=3c7613b4...
+# [23:40:30.855] INFO: [sse] Provider: gemini, Model: gemini-2.5-flash
+# module: "sse"
+# tag: "ROUTING"
+# [23:40:30.856] DEBUG: [sse] gemini | total connections: 1, excludeId: none
+# module: "sse"
+# tag: "AUTH"
+# [23:40:30.856] DEBUG: [sse] gemini | available: 1/1
+# module: "sse"
+# tag: "AUTH"
+# [23:40:30.856] INFO: [sse] Using gemini account: 3c7613b4...
+# module: "sse"
+# tag: "AUTH"
+# [23:40:30.858] DEBUG: [sse] openai → gemini | stream=false
+# module: "sse"
+# tag: "FORMAT"
+# [23:40:30.860] DEBUG: [sse] GEMINI | gemini-2.5-flash | 1 msgs
+# module: "sse"
+# tag: "REQUEST"
+# [23:40:30.864] DEBUG: [sse] Stored response for gemini-2.5-flash (12 tokens)
+# module: "sse"
+# tag: "CACHE"
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-5DubiT/storage.sqlite
+# Subtest: chat pipeline translates OpenAI requests to Gemini and returns OpenAI-shaped responses
+ok 3 - chat pipeline translates OpenAI requests to Gemini and returns OpenAI-shaped responses
+ ---
+ duration_ms: 157.635756
+ type: 'test'
+ ...
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-5DubiT/storage.sqlite
+# [23:40:31.026] INFO: [sse] 📥 POST /v1/messages | openai/gpt-4o-mini | 1 msgs
+# module: "sse"
+# tag: "HTTP"
+# method: "POST"
+# path: "/v1/messages | openai/gpt-4o-mini | 1 msgs"
+# [23:40:31.026] DEBUG: [sse] No API key provided (local mode)
+# module: "sse"
+# tag: "AUTH"
+# [20:40] 📊 [USAGE] OPENAI | in=4 | out=2 | account=9e6e0e97...
+# [23:40:31.029] INFO: [sse] Provider: openai, Model: gpt-4o-mini
+# module: "sse"
+# tag: "ROUTING"
+# [23:40:31.030] DEBUG: [sse] openai | total connections: 1, excludeId: none
+# module: "sse"
+# tag: "AUTH"
+# [23:40:31.030] DEBUG: [sse] openai | available: 1/1
+# module: "sse"
+# tag: "AUTH"
+# [23:40:31.031] INFO: [sse] Using openai account: 9e6e0e97...
+# module: "sse"
+# tag: "AUTH"
+# [23:40:31.032] DEBUG: [sse] claude → openai | stream=false
+# module: "sse"
+# tag: "FORMAT"
+# [23:40:31.035] DEBUG: [sse] OPENAI | gpt-4o-mini | 2 msgs
+# module: "sse"
+# tag: "REQUEST"
+# [23:40:31.041] DEBUG: [sse] Stored response for gpt-4o-mini (6 tokens)
+# module: "sse"
+# tag: "CACHE"
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-5DubiT/storage.sqlite
+# Subtest: chat pipeline translates Claude-format requests into OpenAI upstream and back to Claude
+ok 4 - chat pipeline translates Claude-format requests into OpenAI upstream and back to Claude
+ ---
+ duration_ms: 179.12553
+ type: 'test'
+ ...
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-5DubiT/storage.sqlite
+# [23:40:31.207] INFO: [sse] 📥 POST /v1/chat/completions | claude/claude-sonnet-4-6 | 1 msgs
+# module: "sse"
+# tag: "HTTP"
+# method: "POST"
+# path: "/v1/chat/completions | claude/claude-sonnet-4-6 | 1 msgs"
+# [23:40:31.207] DEBUG: [sse] No API key provided (local mode)
+# module: "sse"
+# tag: "AUTH"
+# [20:40:31] 📊 [USAGE] CLAUDE | in=0 | out=3 | account=5d0e9af4...
+# [20:40:31] 🌊 [STREAM] CLAUDE | claude-sonnet-4-6 | 26ms | complete
+# [23:40:31.209] INFO: [sse] Provider: claude, Model: claude-sonnet-4-6
+# module: "sse"
+# tag: "ROUTING"
+# [23:40:31.211] DEBUG: [sse] claude | total connections: 1, excludeId: none
+# module: "sse"
+# tag: "AUTH"
+# [23:40:31.211] DEBUG: [sse] claude | available: 1/1
+# module: "sse"
+# tag: "AUTH"
+# [23:40:31.211] INFO: [sse] Using claude account: 5d0e9af4...
+# module: "sse"
+# tag: "AUTH"
+# [23:40:31.212] DEBUG: [sse] openai → claude | stream=true
+# module: "sse"
+# tag: "FORMAT"
+# [23:40:31.213] DEBUG: [sse] CLAUDE | claude-sonnet-4-6 | 1 msgs
+# module: "sse"
+# tag: "REQUEST"
+# [23:40:31.214] DEBUG: [sse] Translation mode: claude → openai
+# module: "sse"
+# tag: "STREAM"
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-5DubiT/storage.sqlite
+# Subtest: chat pipeline converts Claude SSE streams into OpenAI SSE output
+ok 5 - chat pipeline converts Claude SSE streams into OpenAI SSE output
+ ---
+ duration_ms: 263.312873
+ type: 'test'
+ ...
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-5DubiT/storage.sqlite
+# [DB] Added api_keys.allowed_connections column
+# [DB] Added api_keys.auto_resolve column
+# [DB] Added api_keys.is_active column
+# [DB] Added api_keys.access_schedule column
+# [DB] Added api_keys.max_requests_per_day column
+# [DB] Added api_keys.max_requests_per_minute column
+# [DB] Added api_keys.max_sessions column
+# [23:40:31.448] INFO: [sse] 📥 POST /v1/chat/completions | openai/gpt-4o-mini | 1 msgs
+# module: "sse"
+# tag: "HTTP"
+# method: "POST"
+# path: "/v1/chat/completions | openai/gpt-4o-mini | 1 msgs"
+# [23:40:31.448] DEBUG: [sse] API Key: does...xist
+# module: "sse"
+# tag: "AUTH"
+# [23:40:31.456] WARN: [sse] API key not found or invalid (must be created in API Manager)
+# module: "sse"
+# tag: "AUTH"
+# [23:40:31.458] WARN: [sse] Invalid JSON body
+# module: "sse"
+# tag: "CHAT"
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-5DubiT/storage.sqlite
+# Subtest: chat pipeline rejects invalid API keys and malformed JSON bodies
+ok 6 - chat pipeline rejects invalid API keys and malformed JSON bodies
+ ---
+ duration_ms: 144.197861
+ type: 'test'
+ ...
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-5DubiT/storage.sqlite
+# [23:40:31.570] INFO: [sse] 📥 POST /v1/chat/completions | openai/gpt-4o-mini | 1 msgs
+# module: "sse"
+# tag: "HTTP"
+# method: "POST"
+# path: "/v1/chat/completions | openai/gpt-4o-mini | 1 msgs"
+# [23:40:31.570] DEBUG: [sse] No API key provided (local mode)
+# module: "sse"
+# tag: "AUTH"
+# [23:40:31.570] WARN: [sse] Missing API key while REQUIRE_API_KEY=true
+# module: "sse"
+# tag: "AUTH"
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-5DubiT/storage.sqlite
+# Subtest: chat pipeline rejects requests without a bearer key when strict API key mode is enabled
+ok 7 - chat pipeline rejects requests without a bearer key when strict API key mode is enabled
+ ---
+ duration_ms: 159.810061
+ type: 'test'
+ ...
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-5DubiT/storage.sqlite
+# [23:40:31.727] INFO: [sse] 📥 POST /v1/chat/completions | undefined | 1 msgs
+# module: "sse"
+# tag: "HTTP"
+# method: "POST"
+# path: "/v1/chat/completions | undefined | 1 msgs"
+# [23:40:31.727] DEBUG: [sse] No API key provided (local mode)
+# module: "sse"
+# tag: "AUTH"
+# [23:40:31.727] WARN: [sse] Missing model
+# module: "sse"
+# tag: "CHAT"
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-5DubiT/storage.sqlite
+# Subtest: chat pipeline returns 400 when the model field is omitted
+ok 8 - chat pipeline returns 400 when the model field is omitted
+ ---
+ duration_ms: 152.12799
+ type: 'test'
+ ...
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-5DubiT/storage.sqlite
+# [23:40:31.907] DEBUG: [sse] Accept: text/event-stream header → overriding stream=true (body had no stream field)
+# module: "sse"
+# tag: "STREAM"
+# [23:40:31.907] INFO: [sse] 📥 POST /v1/chat/completions | openai/gpt-4o-mini | 1 msgs
+# module: "sse"
+# tag: "HTTP"
+# method: "POST"
+# path: "/v1/chat/completions | openai/gpt-4o-mini | 1 msgs"
+# [23:40:31.907] DEBUG: [sse] No API key provided (local mode)
+# module: "sse"
+# tag: "AUTH"
+# [20:40:31] 📊 [USAGE] OPENAI | in=2062 | out=6 | account=93009bc3... (estimated)
+# [20:40:31] 🌊 [STREAM] OPENAI | gpt-4o-mini | 10ms | complete
+# [23:40:31.910] INFO: [sse] Provider: openai, Model: gpt-4o-mini
+# module: "sse"
+# tag: "ROUTING"
+# [23:40:31.911] DEBUG: [sse] openai | total connections: 1, excludeId: none
+# module: "sse"
+# tag: "AUTH"
+# [23:40:31.911] DEBUG: [sse] openai | available: 1/1
+# module: "sse"
+# tag: "AUTH"
+# [23:40:31.911] INFO: [sse] Using openai account: 93009bc3...
+# module: "sse"
+# tag: "AUTH"
+# [23:40:31.913] DEBUG: [sse] openai → openai | stream=true
+# module: "sse"
+# tag: "FORMAT"
+# [23:40:31.913] DEBUG: [sse] OPENAI | gpt-4o-mini | 1 msgs
+# module: "sse"
+# tag: "REQUEST"
+# [23:40:31.915] DEBUG: [sse] Standard passthrough mode
+# module: "sse"
+# tag: "STREAM"
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-5DubiT/storage.sqlite
+# Subtest: chat pipeline treats Accept text/event-stream as streaming mode and returns a session header
+ok 9 - chat pipeline treats Accept text/event-stream as streaming mode and returns a session header
+ ---
+ duration_ms: 153.539772
+ type: 'test'
+ ...
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-5DubiT/storage.sqlite
+# [20:40] 📊 [USAGE] OPENAI | in=4 | out=2 | account=9fef864f...
+# [23:40:32.063] INFO: [sse] 📥 POST /v1/chat/completions | local-router | 1 msgs
+# module: "sse"
+# tag: "HTTP"
+# method: "POST"
+# path: "/v1/chat/completions | local-router | 1 msgs"
+# [23:40:32.063] DEBUG: [sse] No API key provided (local mode)
+# module: "sse"
+# tag: "AUTH"
+# [23:40:32.064] INFO: [sse] Combo "local-router" [priority] with 1 models
+# module: "sse"
+# tag: "CHAT"
+# [23:40:32.068] INFO: [sse] priority with nested resolution: 1 total models
+# module: "sse"
+# tag: "COMBO"
+# [23:40:32.070] DEBUG: [sse] openai | total connections: 1, excludeId: none
+# module: "sse"
+# tag: "AUTH"
+# [23:40:32.070] DEBUG: [sse] openai | available: 1/1
+# module: "sse"
+# tag: "AUTH"
+# [23:40:32.071] INFO: [sse] Trying model 1/1: openai/gpt-4o-mini
+# module: "sse"
+# tag: "COMBO"
+# [23:40:32.071] INFO: [sse] Provider: openai, Model: gpt-4o-mini
+# module: "sse"
+# tag: "ROUTING"
+# [23:40:32.073] DEBUG: [sse] openai | total connections: 1, excludeId: none
+# module: "sse"
+# tag: "AUTH"
+# [23:40:32.073] DEBUG: [sse] openai | available: 1/1
+# module: "sse"
+# tag: "AUTH"
+# [23:40:32.074] INFO: [sse] Using openai account: 9fef864f...
+# module: "sse"
+# tag: "AUTH"
+# [23:40:32.076] DEBUG: [sse] openai → openai | stream=false
+# module: "sse"
+# tag: "FORMAT"
+# [23:40:32.077] DEBUG: [sse] OPENAI | gpt-4o-mini | 1 msgs
+# module: "sse"
+# tag: "REQUEST"
+# [23:40:32.083] DEBUG: [sse] Stored response for gpt-4o-mini (6 tokens)
+# module: "sse"
+# tag: "CACHE"
+# [23:40:32.088] INFO: [sse] Model openai/gpt-4o-mini succeeded (20ms, 0 fallbacks)
+# module: "sse"
+# tag: "COMBO"
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-5DubiT/storage.sqlite
+# Subtest: chat pipeline supports local mode without Authorization on explicit combos
+ok 10 - chat pipeline supports local mode without Authorization on explicit combos
+ ---
+ duration_ms: 170.688713
+ type: 'test'
+ ...
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-5DubiT/storage.sqlite
+# [DB] Added api_keys.allowed_connections column
+# [DB] Added api_keys.auto_resolve column
+# [DB] Added api_keys.is_active column
+# [DB] Added api_keys.access_schedule column
+# [DB] Added api_keys.max_requests_per_day column
+# [DB] Added api_keys.max_requests_per_minute column
+# [DB] Added api_keys.max_sessions column
+# [23:40:32.256] INFO: [sse] 📥 POST /v1/chat/completions | openai/gpt-4o-mini | 1 msgs
+# module: "sse"
+# tag: "HTTP"
+# method: "POST"
+# path: "/v1/chat/completions | openai/gpt-4o-mini | 1 msgs"
+# [23:40:32.256] DEBUG: [sse] API Key: sk-m...2216
+# module: "sse"
+# tag: "AUTH"
+# [20:40] 📊 [USAGE] OPENAI | in=4 | out=2 | account=50eccfa9...
+# [23:40:32.259] INFO: [sse] Provider: openai, Model: gpt-4o-mini
+# module: "sse"
+# tag: "ROUTING"
+# [23:40:32.261] DEBUG: [sse] openai | total connections: 1, excludeId: none
+# module: "sse"
+# tag: "AUTH"
+# [23:40:32.261] DEBUG: [sse] openai | available: 1/1
+# module: "sse"
+# tag: "AUTH"
+# [23:40:32.261] INFO: [sse] Using openai account: 50eccfa9...
+# module: "sse"
+# tag: "AUTH"
+# [23:40:32.263] DEBUG: [sse] openai → openai | stream=false
+# module: "sse"
+# tag: "FORMAT"
+# [23:40:32.264] DEBUG: [sse] OPENAI | gpt-4o-mini | 1 msgs
+# module: "sse"
+# tag: "REQUEST"
+# [23:40:32.273] DEBUG: [sse] Stored response for gpt-4o-mini (6 tokens)
+# module: "sse"
+# tag: "CACHE"
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-5DubiT/storage.sqlite
+# Subtest: chat pipeline honors noLog by redacting persisted call log payloads
+ok 11 - chat pipeline honors noLog by redacting persisted call log payloads
+ ---
+ duration_ms: 211.592743
+ type: 'test'
+ ...
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-5DubiT/storage.sqlite
+# [23:40:32.408] INFO: [sse] 📥 POST /v1/chat/completions | openai/gpt-4o-mini | 1 msgs
+# module: "sse"
+# tag: "HTTP"
+# method: "POST"
+# path: "/v1/chat/completions | openai/gpt-4o-mini | 1 msgs"
+# [23:40:32.408] DEBUG: [sse] No API key provided (local mode)
+# module: "sse"
+# tag: "AUTH"
+# [23:40:32.443] INFO: [sse] Provider: openai, Model: gpt-4o-mini
+# module: "sse"
+# tag: "ROUTING"
+# [23:40:32.443] DEBUG: [sse] openai | total connections: 0, excludeId: none
+# module: "sse"
+# tag: "AUTH"
+# [23:40:32.444] DEBUG: [sse] openai | all connections (incl inactive): 0
+# module: "sse"
+# tag: "AUTH"
+# [23:40:32.444] WARN: [sse] No credentials for openai
+# module: "sse"
+# tag: "AUTH"
+# [23:40:32.444] ERROR: [sse] No credentials for provider: openai
+# module: "sse"
+# tag: "AUTH"
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-5DubiT/storage.sqlite
+# Subtest: chat pipeline returns current no-credentials contract when no provider connection exists
+ok 12 - chat pipeline returns current no-credentials contract when no provider connection exists
+ ---
+ duration_ms: 140.10352
+ type: 'test'
+ ...
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-5DubiT/storage.sqlite
+# [23:40:32.576] INFO: [sse] 📥 POST /v1/chat/completions | openai/gpt-4o-mini | 1 msgs
+# module: "sse"
+# tag: "HTTP"
+# method: "POST"
+# path: "/v1/chat/completions | openai/gpt-4o-mini | 1 msgs"
+# [23:40:32.576] DEBUG: [sse] No API key provided (local mode)
+# module: "sse"
+# tag: "AUTH"
+# [23:40:32.579] INFO: [sse] Provider: openai, Model: gpt-4o-mini
+# module: "sse"
+# tag: "ROUTING"
+# [23:40:32.579] WARN: [sse] openai/gpt-4o-mini is in cooldown, rejecting request
+# module: "sse"
+# tag: "AVAILABILITY"
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-5DubiT/storage.sqlite
+# Subtest: chat pipeline returns 503 when the requested model is temporarily unavailable
+ok 13 - chat pipeline returns 503 when the requested model is temporarily unavailable
+ ---
+ duration_ms: 132.250444
+ type: 'test'
+ ...
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-5DubiT/storage.sqlite
+# [23:40:32.711] INFO: [sse] 📥 POST /v1/chat/completions | openai/gpt-4o-mini | 1 msgs
+# module: "sse"
+# tag: "HTTP"
+# method: "POST"
+# path: "/v1/chat/completions | openai/gpt-4o-mini | 1 msgs"
+# [23:40:32.711] DEBUG: [sse] No API key provided (local mode)
+# module: "sse"
+# tag: "AUTH"
+# [ERROR] [500]: provider exploded
+# ❌ openai [500]: [500]: provider exploded
+# [23:40:32.726] INFO: [sse] Provider: openai, Model: gpt-4o-mini
+# module: "sse"
+# tag: "ROUTING"
+# [23:40:32.727] DEBUG: [sse] openai | total connections: 1, excludeId: none
+# module: "sse"
+# tag: "AUTH"
+# [23:40:32.727] DEBUG: [sse] openai | available: 1/1
+# module: "sse"
+# tag: "AUTH"
+# [23:40:32.728] INFO: [sse] Using openai account: 4ab558c6...
+# module: "sse"
+# tag: "AUTH"
+# [23:40:32.732] DEBUG: [sse] openai → openai | stream=false
+# module: "sse"
+# tag: "FORMAT"
+# [23:40:32.735] DEBUG: [sse] OPENAI | gpt-4o-mini | 1 msgs
+# module: "sse"
+# tag: "REQUEST"
+# [23:40:32.772] WARN: [sse] Account 4ab558c6... unavailable (500), trying fallback
+# module: "sse"
+# tag: "AUTH"
+# [23:40:32.773] DEBUG: [sse] openai | total connections: 1, excludeId: 4ab558c6-3588-4e36-b434-a324e8cf1bc3
+# module: "sse"
+# tag: "AUTH"
+# [23:40:32.773] DEBUG: [sse] openai | available: 0/1
+# module: "sse"
+# tag: "AUTH"
+# [23:40:32.773] DEBUG: [sse] → 4ab558c6 | excluded rateLimited until 2026-04-06T23:40:35.770Z
+# module: "sse"
+# tag: "AUTH"
+# [23:40:32.774] WARN: [sse] openai | all 1 active accounts rate limited (reset after 3s) | lastErrorCode=500.0, lastError=[500]: provider exploded
+# module: "sse"
+# tag: "AUTH"
+# [23:40:32.774] WARN: [sse] [openai/gpt-4o-mini] [500]: provider exploded (reset after 3s)
+# module: "sse"
+# tag: "CHAT"
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-5DubiT/storage.sqlite
+# Subtest: chat pipeline surfaces upstream 500 responses as structured errors
+ok 14 - chat pipeline surfaces upstream 500 responses as structured errors
+ ---
+ duration_ms: 219.873381
+ type: 'test'
+ ...
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-5DubiT/storage.sqlite
+# [23:40:32.973] INFO: [sse] 📥 POST /v1/chat/completions | openai/gpt-4o-mini | 1 msgs
+# module: "sse"
+# tag: "HTTP"
+# method: "POST"
+# path: "/v1/chat/completions | openai/gpt-4o-mini | 1 msgs"
+# [23:40:32.973] DEBUG: [sse] No API key provided (local mode)
+# module: "sse"
+# tag: "AUTH"
+# [23:40:32.977] INFO: [sse] Provider: openai, Model: gpt-4o-mini
+# module: "sse"
+# tag: "ROUTING"
+# [23:40:32.979] DEBUG: [sse] openai | total connections: 1, excludeId: none
+# module: "sse"
+# tag: "AUTH"
+# [23:40:32.979] DEBUG: [sse] openai | available: 1/1
+# module: "sse"
+# tag: "AUTH"
+# [23:40:32.980] INFO: [sse] Using openai account: 71ff871a...
+# module: "sse"
+# tag: "AUTH"
+# [23:40:32.983] DEBUG: [sse] openai → openai | stream=false
+# module: "sse"
+# tag: "FORMAT"
+# [23:40:32.984] DEBUG: [sse] OPENAI | gpt-4o-mini | 1 msgs
+# module: "sse"
+# tag: "REQUEST"
+# [23:40:32.986] DEBUG: [sse] 429 intra-retry 1/2 on https://api.openai.com/v1/chat/completions — waiting 0ms
+# module: "sse"
+# tag: "RETRY"
+# [23:40:32.989] DEBUG: [sse] 429 intra-retry 2/2 on https://api.openai.com/v1/chat/completions — waiting 0ms
+# module: "sse"
+# tag: "RETRY"
+# [provider] Node 71ff871a-0cc7-4cf5-aecd-ee0f6bdd87f2 rate limited (429) - Next available at 2026-04-06T23:41:02.996Z
+# [ERROR] [429]: Rate limit exceeded. Your quota will reset after 30s.
+# [23:40:33.006] INFO: [sse] 71ff871a terminal status=credits_exhausted, skipping cooldown overwrite
+# module: "sse"
+# tag: "AUTH"
+# [23:40:33.006] WARN: [sse] Account 71ff871a... unavailable (429), trying fallback
+# module: "sse"
+# tag: "AUTH"
+# [23:40:33.007] DEBUG: [sse] openai | total connections: 1, excludeId: 71ff871a-0cc7-4cf5-aecd-ee0f6bdd87f2
+# module: "sse"
+# tag: "AUTH"
+# [23:40:33.007] DEBUG: [sse] openai | available: 0/1
+# module: "sse"
+# tag: "AUTH"
+# [23:40:33.007] DEBUG: [sse] → 71ff871a | excluded rateLimited until 2026-04-06T23:41:02.996Z
+# module: "sse"
+# tag: "AUTH"
+# [23:40:33.007] WARN: [sse] openai | all 1 active accounts rate limited (reset after 30s) | lastErrorCode=429.0, lastError=Rate limit exceeded. Your quota will reset after 3
+# module: "sse"
+# tag: "AUTH"
+# [23:40:33.007] INFO: [sse] openai/gpt-4o-mini marked unavailable — all accounts exhausted (HTTP 429)
+# module: "sse"
+# tag: "AVAILABILITY"
+# [23:40:33.007] WARN: [sse] [openai/gpt-4o-mini] [429]: Rate limit exceeded. Your quota will reset after 30s. (reset after 30s)
+# module: "sse"
+# tag: "CHAT"
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-5DubiT/storage.sqlite
+# Subtest: chat pipeline returns 429 with Retry-After when the upstream rate-limits the only account
+ok 15 - chat pipeline returns 429 with Retry-After when the upstream rate-limits the only account
+ ---
+ duration_ms: 219.862586
+ type: 'test'
+ ...
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-5DubiT/storage.sqlite
+# [23:40:33.195] INFO: [sse] 📥 POST /v1/chat/completions | openai/gpt-4o-mini | 1 msgs
+# module: "sse"
+# tag: "HTTP"
+# method: "POST"
+# path: "/v1/chat/completions | openai/gpt-4o-mini | 1 msgs"
+# [23:40:33.195] DEBUG: [sse] No API key provided (local mode)
+# module: "sse"
+# tag: "AUTH"
+# [ERROR] [504]: upstream timed out
+# ❌ openai [504]: [504]: upstream timed out
+# [23:40:33.197] INFO: [sse] Provider: openai, Model: gpt-4o-mini
+# module: "sse"
+# tag: "ROUTING"
+# [23:40:33.199] DEBUG: [sse] openai | total connections: 1, excludeId: none
+# module: "sse"
+# tag: "AUTH"
+# [23:40:33.199] DEBUG: [sse] openai | available: 1/1
+# module: "sse"
+# tag: "AUTH"
+# [23:40:33.199] INFO: [sse] Using openai account: b0f13742...
+# module: "sse"
+# tag: "AUTH"
+# [23:40:33.201] DEBUG: [sse] openai → openai | stream=false
+# module: "sse"
+# tag: "FORMAT"
+# [23:40:33.202] DEBUG: [sse] OPENAI | gpt-4o-mini | 1 msgs
+# module: "sse"
+# tag: "REQUEST"
+# [23:40:33.203] WARN: [sse] Fetch timeout after 600000ms on https://api.openai.com/v1/chat/completions
+# module: "sse"
+# tag: "TIMEOUT"
+# [23:40:33.207] WARN: [sse] Account b0f13742... unavailable (504), trying fallback
+# module: "sse"
+# tag: "AUTH"
+# [23:40:33.208] DEBUG: [sse] openai | total connections: 1, excludeId: b0f13742-172d-4e2f-b1bd-51ff12ca0898
+# module: "sse"
+# tag: "AUTH"
+# [23:40:33.208] DEBUG: [sse] openai | available: 0/1
+# module: "sse"
+# tag: "AUTH"
+# [23:40:33.209] DEBUG: [sse] → b0f13742 | excluded rateLimited until 2026-04-06T23:40:36.206Z
+# module: "sse"
+# tag: "AUTH"
+# [23:40:33.209] WARN: [sse] openai | all 1 active accounts rate limited (reset after 3s) | lastErrorCode=504.0, lastError=[504]: upstream timed out
+# module: "sse"
+# tag: "AUTH"
+# [23:40:33.209] WARN: [sse] [openai/gpt-4o-mini] [504]: upstream timed out (reset after 3s)
+# module: "sse"
+# tag: "CHAT"
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-5DubiT/storage.sqlite
+# Subtest: chat pipeline maps upstream timeouts to 504 responses
+ok 16 - chat pipeline maps upstream timeouts to 504 responses
+ ---
+ duration_ms: 202.717074
+ type: 'test'
+ ...
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-5DubiT/storage.sqlite
+# [DB] Added api_keys.allowed_connections column
+# [DB] Added api_keys.auto_resolve column
+# [DB] Added api_keys.is_active column
+# [DB] Added api_keys.access_schedule column
+# [DB] Added api_keys.max_requests_per_day column
+# [DB] Added api_keys.max_requests_per_minute column
+# [DB] Added api_keys.max_sessions column
+# [23:40:33.412] INFO: [sse] 📥 POST /v1/chat/completions | openai/gpt-4o-mini | 1 msgs
+# module: "sse"
+# tag: "HTTP"
+# method: "POST"
+# path: "/v1/chat/completions | openai/gpt-4o-mini | 1 msgs"
+# [23:40:33.412] DEBUG: [sse] API Key: sk-m...779b
+# module: "sse"
+# tag: "AUTH"
+# [20:40] 📊 [USAGE] OPENAI | in=4 | out=2 | account=c2029285...
+# [23:40:33.417] INFO: [sse] Provider: openai, Model: gpt-4o-mini
+# module: "sse"
+# tag: "ROUTING"
+# [23:40:33.418] DEBUG: [sse] openai | total connections: 1, excludeId: none
+# module: "sse"
+# tag: "AUTH"
+# [23:40:33.418] DEBUG: [sse] openai | available: 1/1
+# module: "sse"
+# tag: "AUTH"
+# [23:40:33.421] INFO: [sse] Using openai account: c2029285...
+# module: "sse"
+# tag: "AUTH"
+# [23:40:33.423] DEBUG: [sse] openai → openai | stream=false
+# module: "sse"
+# tag: "FORMAT"
+# [23:40:33.425] DEBUG: [sse] Injected 1 memories for key=75502502-4c99-4f6e-9719-5581b00e0185
+# module: "sse"
+# tag: "MEMORY"
+# [23:40:33.426] DEBUG: [sse] OPENAI | gpt-4o-mini | 2 msgs
+# module: "sse"
+# tag: "REQUEST"
+# [23:40:33.439] DEBUG: [sse] Stored response for gpt-4o-mini (6 tokens)
+# module: "sse"
+# tag: "CACHE"
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-5DubiT/storage.sqlite
+# Subtest: chat pipeline injects memory context before sending the upstream request
+ok 17 - chat pipeline injects memory context before sending the upstream request
+ ---
+ duration_ms: 229.129863
+ type: 'test'
+ ...
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-5DubiT/storage.sqlite
+# [DB] Added api_keys.allowed_connections column
+# [DB] Added api_keys.auto_resolve column
+# [DB] Added api_keys.is_active column
+# [DB] Added api_keys.access_schedule column
+# [DB] Added api_keys.max_requests_per_day column
+# [DB] Added api_keys.max_requests_per_minute column
+# [DB] Added api_keys.max_sessions column
+# [23:40:33.643] INFO: [sse] 📥 POST /v1/chat/completions | openai/gpt-4o-mini | 1 msgs
+# module: "sse"
+# tag: "HTTP"
+# method: "POST"
+# path: "/v1/chat/completions | openai/gpt-4o-mini | 1 msgs"
+# [23:40:33.646] DEBUG: [sse] API Key: sk-m...e420
+# module: "sse"
+# tag: "AUTH"
+# [20:40] 📊 [USAGE] OPENAI | in=6 | out=4 | account=eb34b60b...
+# [23:40:33.650] INFO: [sse] Provider: openai, Model: gpt-4o-mini
+# module: "sse"
+# tag: "ROUTING"
+# [23:40:33.651] DEBUG: [sse] openai | total connections: 1, excludeId: none
+# module: "sse"
+# tag: "AUTH"
+# [23:40:33.651] DEBUG: [sse] openai | available: 1/1
+# module: "sse"
+# tag: "AUTH"
+# [23:40:33.652] INFO: [sse] Using openai account: eb34b60b...
+# module: "sse"
+# tag: "AUTH"
+# [23:40:33.654] DEBUG: [sse] openai → openai | stream=false
+# module: "sse"
+# tag: "FORMAT"
+# [23:40:33.656] DEBUG: [sse] Injected 1 skills
+# module: "sse"
+# tag: "SKILLS"
+# [23:40:33.658] DEBUG: [sse] OPENAI | gpt-4o-mini | 1 msgs
+# module: "sse"
+# tag: "REQUEST"
+# [23:40:33.672] DEBUG: [sse] Stored response for gpt-4o-mini (10 tokens)
+# module: "sse"
+# tag: "CACHE"
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-5DubiT/storage.sqlite
+# Subtest: chat pipeline injects skills into tools and intercepts tool calls with skill output
+ok 18 - chat pipeline injects skills into tools and intercepts tool calls with skill output
+ ---
+ duration_ms: 230.685673
+ type: 'test'
+ ...
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-5DubiT/storage.sqlite
+# [23:40:33.815] INFO: [sse] 📥 POST /v1/chat/completions | openai/gpt-4o-mini | 1 msgs
+# module: "sse"
+# tag: "HTTP"
+# method: "POST"
+# path: "/v1/chat/completions | openai/gpt-4o-mini | 1 msgs"
+# [23:40:33.815] DEBUG: [sse] No API key provided (local mode)
+# module: "sse"
+# tag: "AUTH"
+# [ERROR] [500]: first account failed
+# ❌ openai [500]: [500]: first account failed
+# [20:40] 📊 [USAGE] OPENAI | in=4 | out=2 | account=8ae4bbf9...
+# [23:40:33.817] INFO: [sse] Provider: openai, Model: gpt-4o-mini
+# module: "sse"
+# tag: "ROUTING"
+# [23:40:33.818] DEBUG: [sse] openai | total connections: 2, excludeId: none
+# module: "sse"
+# tag: "AUTH"
+# [23:40:33.818] DEBUG: [sse] openai | available: 2/2
+# module: "sse"
+# tag: "AUTH"
+# [23:40:33.818] INFO: [sse] Using openai account: 5cfce4ff...
+# module: "sse"
+# tag: "AUTH"
+# [23:40:33.819] DEBUG: [sse] openai → openai | stream=false
+# module: "sse"
+# tag: "FORMAT"
+# [23:40:33.820] DEBUG: [sse] OPENAI | gpt-4o-mini | 1 msgs
+# module: "sse"
+# tag: "REQUEST"
+# [23:40:33.824] WARN: [sse] Account 5cfce4ff... unavailable (500), trying fallback
+# module: "sse"
+# tag: "AUTH"
+# [23:40:33.825] DEBUG: [sse] openai | total connections: 2, excludeId: 5cfce4ff-00c1-4e25-8c9b-acc7be84082f
+# module: "sse"
+# tag: "AUTH"
+# [23:40:33.825] DEBUG: [sse] openai | available: 1/2
+# module: "sse"
+# tag: "AUTH"
+# [23:40:33.825] DEBUG: [sse] → 5cfce4ff | excluded rateLimited until 2026-04-06T23:40:36.823Z
+# module: "sse"
+# tag: "AUTH"
+# [23:40:33.825] INFO: [sse] Using openai account: 8ae4bbf9...
+# module: "sse"
+# tag: "AUTH"
+# [23:40:33.826] DEBUG: [sse] openai → openai | stream=false
+# module: "sse"
+# tag: "FORMAT"
+# [23:40:33.826] DEBUG: [sse] OPENAI | gpt-4o-mini | 1 msgs
+# module: "sse"
+# tag: "REQUEST"
+# [23:40:33.829] DEBUG: [sse] Stored response for gpt-4o-mini (6 tokens)
+# module: "sse"
+# tag: "CACHE"
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-5DubiT/storage.sqlite
+# Subtest: chat pipeline falls back to the next account after a provider failure
+ok 19 - chat pipeline falls back to the next account after a provider failure
+ ---
+ duration_ms: 147.807701
+ type: 'test'
+ ...
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-5DubiT/storage.sqlite
+# [ERROR] [503]: openai combo miss
+# ❌ openai [503]: [503]: openai combo miss
+# [23:40:33.958] INFO: [sse] 📥 POST /v1/chat/completions | combo-fallback | 1 msgs
+# module: "sse"
+# tag: "HTTP"
+# method: "POST"
+# path: "/v1/chat/completions | combo-fallback | 1 msgs"
+# [23:40:33.959] DEBUG: [sse] No API key provided (local mode)
+# module: "sse"
+# tag: "AUTH"
+# [23:40:33.959] INFO: [sse] Combo "combo-fallback" [priority] with 2 models
+# module: "sse"
+# tag: "CHAT"
+# [23:40:33.960] INFO: [sse] priority with nested resolution: 2 total models
+# module: "sse"
+# tag: "COMBO"
+# [23:40:33.961] DEBUG: [sse] openai | total connections: 1, excludeId: none
+# module: "sse"
+# tag: "AUTH"
+# [23:40:33.961] DEBUG: [sse] openai | available: 1/1
+# module: "sse"
+# tag: "AUTH"
+# [23:40:33.961] INFO: [sse] Trying model 1/2: openai/gpt-4o-mini
+# module: "sse"
+# tag: "COMBO"
+# [23:40:33.961] INFO: [sse] Provider: openai, Model: gpt-4o-mini
+# module: "sse"
+# tag: "ROUTING"
+# [23:40:33.962] DEBUG: [sse] openai | total connections: 1, excludeId: none
+# module: "sse"
+# tag: "AUTH"
+# [23:40:33.962] DEBUG: [sse] openai | available: 1/1
+# module: "sse"
+# tag: "AUTH"
+# [23:40:33.962] INFO: [sse] Using openai account: 116917d1...
+# module: "sse"
+# tag: "AUTH"
+# [23:40:33.963] DEBUG: [sse] openai → openai | stream=false
+# module: "sse"
+# tag: "FORMAT"
+# [23:40:33.963] DEBUG: [sse] OPENAI | gpt-4o-mini | 1 msgs
+# module: "sse"
+# tag: "REQUEST"
+# [23:40:33.971] WARN: [sse] Account 116917d1... unavailable (503), trying fallback
+# module: "sse"
+# tag: "AUTH"
+# [23:40:33.971] DEBUG: [sse] openai | total connections: 1, excludeId: 116917d1-5c07-40ff-ba36-b5bea52054ff
+# module: "sse"
+# tag: "AUTH"
+# [23:40:33.971] DEBUG: [sse] openai | available: 0/1
+# module: "sse"
+# tag: "AUTH"
+# [23:40:33.971] DEBUG: [sse] → 116917d1 | excluded rateLimited until 2026-04-06T23:40:36.970Z
+# module: "sse"
+# tag: "AUTH"
+# [23:40:33.971] WARN: [sse] openai | all 1 active accounts rate limited (reset after 3s) | lastErrorCode=503.0, lastError=[503]: openai combo miss
+# module: "sse"
+# tag: "AUTH"
+# [23:40:33.971] INFO: [sse] openai/gpt-4o-mini marked unavailable — all accounts exhausted (HTTP 503)
+# module: "sse"
+# tag: "AVAILABILITY"
+# [23:40:33.971] WARN: [sse] [openai/gpt-4o-mini] [503]: openai combo miss (reset after 3s)
+# module: "sse"
+# tag: "CHAT"
+# [23:40:33.972] WARN: [sse] Model openai/gpt-4o-mini failed, trying next
+# module: "sse"
+# tag: "COMBO"
+# status: 503
+# [23:40:33.972] INFO: [sse] Waiting 3000ms before fallback to next model
+# module: "sse"
+# tag: "COMBO"
+# [20:40] 📊 [USAGE] CLAUDE | in=10 | out=4 | account=23e06021...
+# [23:40:36.974] DEBUG: [sse] claude | total connections: 1, excludeId: none
+# module: "sse"
+# tag: "AUTH"
+# [23:40:36.975] DEBUG: [sse] claude | available: 1/1
+# module: "sse"
+# tag: "AUTH"
+# [23:40:36.975] INFO: [sse] Trying model 2/2: claude/claude-3-5-sonnet-20241022
+# module: "sse"
+# tag: "COMBO"
+# [23:40:36.975] INFO: [sse] Provider: claude, Model: claude-3-5-sonnet-20241022
+# module: "sse"
+# tag: "ROUTING"
+# [23:40:36.976] DEBUG: [sse] claude | total connections: 1, excludeId: none
+# module: "sse"
+# tag: "AUTH"
+# [23:40:36.976] DEBUG: [sse] claude | available: 1/1
+# module: "sse"
+# tag: "AUTH"
+# [23:40:36.976] INFO: [sse] Using claude account: 23e06021...
+# module: "sse"
+# tag: "AUTH"
+# [23:40:36.977] DEBUG: [sse] openai → claude | stream=false
+# module: "sse"
+# tag: "FORMAT"
+# [23:40:36.978] DEBUG: [sse] CLAUDE | claude-3-5-sonnet-20241022 | 1 msgs
+# module: "sse"
+# tag: "REQUEST"
+# [23:40:36.981] DEBUG: [sse] Stored response for claude-3-5-sonnet-20241022 (14 tokens)
+# module: "sse"
+# tag: "CACHE"
+# [23:40:36.983] INFO: [sse] Model claude/claude-3-5-sonnet-20241022 succeeded (3023ms, 0 fallbacks)
+# module: "sse"
+# tag: "COMBO"
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-5DubiT/storage.sqlite
+# Subtest: chat pipeline falls back across combo models when the first provider fails
+ok 20 - chat pipeline falls back across combo models when the first provider fails
+ ---
+ duration_ms: 3156.605154
+ type: 'test'
+ ...
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-5DubiT/storage.sqlite
+# [23:40:37.124] INFO: [sse] 📥 POST /v1/chat/completions | openai/gpt-4o-mini | 1 msgs
+# module: "sse"
+# tag: "HTTP"
+# method: "POST"
+# path: "/v1/chat/completions | openai/gpt-4o-mini | 1 msgs"
+# [23:40:37.124] DEBUG: [sse] No API key provided (local mode)
+# module: "sse"
+# tag: "AUTH"
+# [23:40:37.125] INFO: [sse] 📥 POST /v1/chat/completions | openai/gpt-4o-mini | 1 msgs
+# module: "sse"
+# tag: "HTTP"
+# method: "POST"
+# path: "/v1/chat/completions | openai/gpt-4o-mini | 1 msgs"
+# [23:40:37.125] DEBUG: [sse] No API key provided (local mode)
+# module: "sse"
+# tag: "AUTH"
+# [23:40:37.127] INFO: [sse] Provider: openai, Model: gpt-4o-mini
+# module: "sse"
+# tag: "ROUTING"
+# [23:40:37.128] DEBUG: [sse] openai | total connections: 1, excludeId: none
+# module: "sse"
+# tag: "AUTH"
+# [23:40:37.128] DEBUG: [sse] openai | available: 1/1
+# module: "sse"
+# tag: "AUTH"
+# [23:40:37.128] INFO: [sse] Using openai account: 10d570ae...
+# module: "sse"
+# tag: "AUTH"
+# [23:40:37.129] DEBUG: [sse] openai → openai | stream=false
+# module: "sse"
+# tag: "FORMAT"
+# [23:40:37.130] DEBUG: [sse] OPENAI | gpt-4o-mini | 1 msgs
+# module: "sse"
+# tag: "REQUEST"
+# [23:40:37.132] INFO: [sse] Provider: openai, Model: gpt-4o-mini
+# module: "sse"
+# tag: "ROUTING"
+# [23:40:37.132] DEBUG: [sse] openai | total connections: 1, excludeId: none
+# module: "sse"
+# tag: "AUTH"
+# [23:40:37.132] DEBUG: [sse] openai | available: 1/1
+# module: "sse"
+# tag: "AUTH"
+# [23:40:37.133] INFO: [sse] Using openai account: 10d570ae...
+# module: "sse"
+# tag: "AUTH"
+# [23:40:37.134] DEBUG: [sse] openai → openai | stream=false
+# module: "sse"
+# tag: "FORMAT"
+# [23:40:37.134] DEBUG: [sse] OPENAI | gpt-4o-mini | 1 msgs
+# module: "sse"
+# tag: "REQUEST"
+# [20:40] 📊 [USAGE] OPENAI | in=4 | out=2 | account=10d570ae...
+# [20:40] 📊 [USAGE] OPENAI | in=4 | out=2 | account=10d570ae...
+# [23:40:37.157] DEBUG: [sse] Joined in-flight request hash=f467c6e15f3cb6e2
+# module: "sse"
+# tag: "DEDUP"
+# [23:40:37.160] DEBUG: [sse] Stored response for gpt-4o-mini (6 tokens)
+# module: "sse"
+# tag: "CACHE"
+# [23:40:37.161] DEBUG: [sse] Stored response for gpt-4o-mini (6 tokens)
+# module: "sse"
+# tag: "CACHE"
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# [Migration] Applied: 002_mcp_a2a_tables
+# [Migration] Applied: 003_provider_node_custom_paths
+# [Migration] Applied: 004_proxy_registry
+# [Migration] Applied: 005_combo_agent_fields
+# [Migration] Applied: 006_detailed_request_logs
+# [Migration] Applied: 007_search_request_type
+# [Migration] Applied: 008_registered_keys
+# [Migration] Applied: 009_requested_model
+# [Migration] Applied: 010_model_combo_mappings
+# [Migration] Applied: 011_webhooks
+# [Migration] Applied: 012_fix_token_input_cache_tokens
+# [Migration] Applied: 013_quota_snapshots
+# [Migration] Applied: 014_unified_log_artifacts
+# [Migration] Applied: 015_create_memories
+# [Migration] Applied: 016_create_skills
+# [Migration] Applied: 017_version_manager_upstream_proxy
+# [Migration] 16 migration(s) applied successfully.
+# [DB] SQLite database ready: /tmp/omniroute-chat-pipeline-5DubiT/storage.sqlite
+# [DB] SQLite WAL checkpoint completed (TRUNCATE).
+# Subtest: chat pipeline deduplicates concurrent identical non-stream requests
+ok 21 - chat pipeline deduplicates concurrent identical non-stream requests
+ ---
+ duration_ms: 176.545473
+ type: 'test'
+ ...
+# === WTF NODE DUMP ===
+# [WTF Node?] open handles:
+# - File descriptors: (note: stdio always exists)
+# - fd 2 (stdio)
+# - fd 1 (stdio)
+1..21
+# tests 21
+# suites 0
+# pass 21
+# fail 0
+# cancelled 0
+# skipped 0
+# todo 0
+# duration_ms 36056.905402
diff --git a/package-lock.json b/package-lock.json
index 1e2971dd13..436c868a93 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -78,7 +78,8 @@
"typescript": "^5.9.3",
"typescript-eslint": "^8.56.0",
"vitest": "^4.1.2",
- "wait-on": "^9.0.4"
+ "wait-on": "^9.0.4",
+ "wtfnode": "^0.10.1"
},
"engines": {
"node": ">=18.0.0 <24.0.0"
@@ -20666,6 +20667,19 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
+ "node_modules/wtfnode": {
+ "version": "0.10.1",
+ "resolved": "https://registry.npmjs.org/wtfnode/-/wtfnode-0.10.1.tgz",
+ "integrity": "sha512-4mcHdlvcdSytsbFueN6QYZxmh5K7REawBk//ZOrJrtVOe548Qsq4GNEm/OUfZATqDnsX4g8uBbzmN7NdEZx09Q==",
+ "dev": true,
+ "license": "ISC",
+ "bin": {
+ "wtfnode": "proxy.js"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
"node_modules/xml-name-validator": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-5.0.0.tgz",
diff --git a/package.json b/package.json
index 1536a01bb3..cfa8f2526c 100644
--- a/package.json
+++ b/package.json
@@ -150,7 +150,8 @@
"typescript": "^5.9.3",
"typescript-eslint": "^8.56.0",
"vitest": "^4.1.2",
- "wait-on": "^9.0.4"
+ "wait-on": "^9.0.4",
+ "wtfnode": "^0.10.1"
},
"lint-staged": {
"*.{js,jsx,ts,tsx,mjs}": [
diff --git a/playwright.config.ts b/playwright.config.ts
index f18cd254e4..def2d7cc9a 100644
--- a/playwright.config.ts
+++ b/playwright.config.ts
@@ -14,6 +14,9 @@ export default defineConfig({
retries: process.env.CI ? 2 : 0,
workers: 1,
reporter: process.env.CI ? "github" : "html",
+ expect: {
+ timeout: process.env.CI ? 30_000 : 10_000,
+ },
use: {
baseURL: dashboardBaseUrl,
navigationTimeout: 300_000,
diff --git a/src/lib/a2a/taskManager.ts b/src/lib/a2a/taskManager.ts
index 7ef85a3d89..390bcda03d 100644
--- a/src/lib/a2a/taskManager.ts
+++ b/src/lib/a2a/taskManager.ts
@@ -81,8 +81,14 @@ export class A2ATaskManager {
constructor(ttlMinutes: number = 5) {
this.ttlMs = ttlMinutes * 60 * 1000;
- // Cleanup expired tasks every 60s
this.cleanupInterval = setInterval(() => this.cleanupExpired(), 60_000);
+ if (
+ this.cleanupInterval &&
+ typeof this.cleanupInterval === "object" &&
+ "unref" in this.cleanupInterval
+ ) {
+ (this.cleanupInterval as { unref?: () => void }).unref?.();
+ }
}
createTask(input: TaskInput): A2ATask {
diff --git a/src/lib/modelsDevSync.ts b/src/lib/modelsDevSync.ts
index 858baced6b..1b1d60a7fb 100644
--- a/src/lib/modelsDevSync.ts
+++ b/src/lib/modelsDevSync.ts
@@ -643,6 +643,10 @@ export function startPeriodicSync(intervalMs?: number): void {
console.warn("[MODELS_DEV] Periodic sync error:", err instanceof Error ? err.message : err);
});
}, interval);
+
+ if (syncTimer && typeof syncTimer === "object" && "unref" in syncTimer) {
+ (syncTimer as { unref?: () => void }).unref?.();
+ }
}
/**
diff --git a/src/lib/pricingSync.ts b/src/lib/pricingSync.ts
index b6f1fe65c6..953b0d9a2f 100644
--- a/src/lib/pricingSync.ts
+++ b/src/lib/pricingSync.ts
@@ -352,6 +352,10 @@ export function startPeriodicSync(intervalMs?: number): void {
);
});
}, interval);
+
+ if (syncTimer && typeof syncTimer === "object" && "unref" in syncTimer) {
+ (syncTimer as { unref?: () => void }).unref?.();
+ }
}
/**
diff --git a/src/lib/semanticCache.ts b/src/lib/semanticCache.ts
index 369d7a0d68..061bd13f06 100644
--- a/src/lib/semanticCache.ts
+++ b/src/lib/semanticCache.ts
@@ -307,6 +307,9 @@ export function startAutoCleanup(intervalMs = 300_000): void {
console.log(`[SemanticCache] Auto-cleaned ${removed} expired entries`);
}
}, intervalMs);
+ if (_cleanupTimer && typeof _cleanupTimer === "object" && "unref" in _cleanupTimer) {
+ (_cleanupTimer as { unref?: () => void }).unref?.();
+ }
}
/**
diff --git a/src/lib/tokenHealthCheck.ts b/src/lib/tokenHealthCheck.ts
index cc88104654..95a090b166 100644
--- a/src/lib/tokenHealthCheck.ts
+++ b/src/lib/tokenHealthCheck.ts
@@ -126,10 +126,16 @@ export function initTokenHealthCheck() {
log(`${LOG_PREFIX} Starting proactive token health-check (tick every ${TICK_MS / 1000}s)`);
- setTimeout(() => {
+ const timer = setTimeout(() => {
sweep();
state.interval = setInterval(sweep, TICK_MS);
+ if (state.interval && typeof state.interval === "object" && "unref" in state.interval) {
+ (state.interval as { unref?: () => void }).unref?.();
+ }
}, 10_000);
+ if (timer && typeof timer === "object" && "unref" in timer) {
+ (timer as { unref?: () => void }).unref?.();
+ }
}
/**