Skip to content

Phase 1B — OmniRoute Topology and Logs

  • Date: 2026-08-02
  • Workstream(s): B (OmniRoute local topology) and inventory portion of C
  • Dataset: DB snapshot captured at 2026-08-02 ~01:00 UTC

Docker topology

Container

Field Value
Name omniroute
Image diegosouzapw/omniroute:latest
Status Up 13+ hours, healthy
Port mapping 127.0.0.1:<gateway-port>-><gateway-port>/tcp
Command node dev/run-standalone.mjs
NODE_ENV production
OMNIROUTE_MEMORY_MB 1024
DATA_DIR /app/data
NODE_VERSION 26.5.0

Observation: Image tag is latest, not pinned. The node version is relatively recent (26.5.0).

Volume mounts

Mount type Host source Container destination RW
Named volume omniroute-data …/volumes/omniroute-data/_data /app/data RW

Observation: The volume persists across container restarts and image updates. Data survives container lifecycle.

Data directory contents (/app/data)

cache/                        OpenRouter provider catalog JSON
call_logs/                     Per-day directories with artifact files
  2026-07-30/
  2026-07-31/
  2026-08-01/
db_backups/                   Pre-migration backup of the SQLite DB
logs/application/              Application logs (app.log, ~6.7 MB)
server.env                    Server-side environment vars
storage.sqlite                Main SQLite database (~9.6 MB)
storage.sqlite-wal            WAL journal (~4.1 MB)
storage.sqlite-shm            Shared memory file

API endpoint inventory

All management/usage endpoints return:

  • 401 (Authentication required) when called without a token.
  • 403 ("Invalid management token"), when called with the gateway API token.

The gateway API token (ANTHROPIC_AUTH_TOKEN) has no access to management APIs.

Endpoint Method HTTP status Reachable Auth required Shape summary
/v1/models GET 200 Yes Bearer token OpenAI-compatible models list. 25+ models with owned_by: "combo", including auto/best-coding, auto/best-reasoning. Each model object has context_length, capabilities (tool_calling, reasoning, thinking, temperature). Observation: Only combo models are listed. No resolved provider appears at this endpoint.
/api/usage/request-logs GET 403 No Management token required {"error":{"code":"AUTH_001","message":"Invalid management token"}}
/api/usage/logs GET 403 No Management token required Same AUTH_001 response
/api/sessions GET 403 No Management token required Same AUTH_001 response
/api/analytics/auto-routing GET 403 No Management token required Same AUTH_001 response
/api/cloud/model/resolve?model=auto/cheap GET 403 No Management token required Same AUTH_001 response

Observations:

  • The gateway token and a management token are separate authentication scopes. The api_keys table shows the gateway key has scopes ["grammars"], whereas the management key has scopes ["manage", "grammars"].
  • The management APIs, including model/resolve, are not reachable with the gateway token currently in use. This means the routing engine's resolve endpoint is not available to a statusline without a separate management token.
  • call_logs was confirmed to contain resolved provider/model via direct SQLite inspection, but that data path is not exposed through the HTTP API to the gateway token.

SQLite database schema

Call logs table (call_logs)

This is the primary request-level log. Each request gets a row in real time.

Column Type Notes
id PK UUID
timestamp Text ISO 8601
method Text HTTP method, e.g. POST
path Text e.g., /v1/messages
status Integer HTTP status
model Text Resolved model (e.g., big-pickle, claude-sonnet-4.7)
requested_model Text The model the client requested (e.g., auto/cheap, opencode/big-pickle)
provider Text Resolved provider (e.g., opencode, openrouter, blackbox)
account Text Provider connection handle
connection_id Text noauth or KProxy connection identifier
duration Integer ms
tokens_in Integer Prompt tokens
tokens_out Integer Completion tokens
tokens_cache_read Integer Cache-hit tokens
tokens_cache_creation Integer Tokens written to cache
tokens_reasoning Integer Reasoning chain tokens
tokens_compressed Integer Compressed tokens
cache_source Text Default "upstream"
request_type Text Task type
source_format Text Input format
target_format Text Output format
api_key_id Text FK to api_keys
api_key_name Text Key label (e.g., Claude-VSCode)
combo_name Text The combo that resolved the route (e.g., auto/cheap)
combo_step_id Text The combo step (e.g., virtual-auto-cheap-30-opencode)
combo_execution_key Text Batch key for calls within a combo
error_summary Text
detail_state Text none
artifact_relpath Text Path under call_logs/YYYY-MM-DD/
artifact_size_bytes Integer Artifact file size
artifact_sha256 Text Artifact hash
has_request_body Integer 0/1 flag
has_response_body Integer 0/1 flag
has_pipeline_details Integer 0/1 flag
request_summary Text Brief metadata label
correlation_id Text UUID for end-to-end correlation
model_pinned Integer 0/1 — whether model was pinned (non-auto)
session_tag Text Session label (null in all 3680 observed rows)
reasoning_source Text
reasoning_chars Integer

Observation: Differential model resolution is stored. The columns model + provider = the actual route. The columns requested_model + combo_name = the users requested label. These pairs differ when routing is active (e.g., requested_model=auto/cheap becomes model=big-pickle on provider=opencode).

Observation: session_tag is NULL in all 3680 rows sampled. Session-level correlation from call logs alone is not possible without a separate correlation mechanism.

session_model_history

Stores per-session model usage history for correlation.

Column Type
id Integer (salt)
session_id Text: session identifier
combo_name Text: combo used (e.g., auto/cheap)
model_str Text: resolved model string
provider Text: resolved provider
connection_id Text
used_at Text (datetime)

Observation: This table exists but contains 0 rows. The installation under test is not populating session_model_history.

combo_adaptation_state

Tracks the learned scoring for each provider within a combo (adaptive routing).

Column Type
combo_id Text
provider_id Text
learned_score Real (default 0.5)
request_count Integer
success_count Integer
avg_latency_ms Real
last_failure_at Text
excluded_until Text

Observation: Also contains 0 rows. Adaptive learning state is not populated.

request_detail_logs

Ring buffer (500 rows max) for the 4 pipeline stages (request → translate → provider response → client response).

Observation: Contains 0 rows. Request/response body persistence is not active.

usage_history

Lighter usage table with provider, model, token counts, latency, status, error_code, combo_strategy, endpoint. 2581 rows.

Notable absence

No sessions table was found through the HTTP API, so session-level route aggregation is not possible through OmniRoute's web API. The session_model_history table and the OmniRoute inspector (inspector_sessions, inspector_session_requests) are both empty (0 rows each).

Provider distribution

From 3680 call_log rows, top providers by count:

Provider Count
blackbox 994
opencode 885
gemini 400
openrouter 228
mistral 222
groq 190
deepseek 142
nvidia 132
auggie 112
theoldllm 104
openai 47
bazaarlink 44
github 39
auto 22
sambanova 18
...

Observation: The auto/cheap combo with virtual-auto-cheap-30-opencode whose step is currently routing overwhelmingly to opencode (big-pickle). The provider distribution shows the installation has been sending traffic to 15+ providers, with auto/cheap being the primary combo and opencode being the primary resolved provider.

Conclusions

  1. Confirmed: The column model and provider are stored in call_logs and contain the post-routing values. The per-request routing data exists and is observable in SQLite.

  2. Observation: These columns are accessible only via direct SQLite read of the Docker volume, not via the HTTP API (all management endpoints return 403 with the gateway token).

  3. Observation: session_model_history and session-tag on call_logs are not populated (0 rows, all NULL), meaning per-session model history cannot be reconstructed from the logs alone. This would need to be enabled or implemented via a different mechanism.

  4. Hypothesis: A separate management token would unlock /api/cloud/model/resolve?model=auto/cheap and /api/usage/request-logs. That said, the token is not currently stored in the local config.

  5. Recommendation: For a statusline, the SQLite path (read-only, direct to call_logs) is the simplest mechanism for reading resolved provider/model per request, but session-tag correlation and management API access are blocked unless explicitly configured.