Release · March 2026

Smartflow 1.6

Any-to-Any Provider Routing  ·  Trace UI  ·  Prometheus Metrics  ·  OIDC SSO Dashboard
Any-to-Any Routing Trace UI Prometheus /metrics OIDC SSO Config 2 Bug Fixes
Provider Routing
1
Any-to-Any Provider Routing with Automatic Model TranslationNEW
Routing

A single request header — x-smartflow-provider: anthropic (or openai, gemini, ollama) — now routes any request to any provider regardless of the model name in the body. Smartflow automatically translates the model name to the closest capability-tier equivalent on the target provider.


# Send an OpenAI model name → routed to Anthropic
curl https://YOUR_HOST/v1/chat/completions \
  -H "Authorization: Bearer sk-sf-your-key" \
  -H "x-smartflow-provider: anthropic" \
  -d '{"model":"gpt-5.4","messages":[...]}'
# → Smartflow sends claude-opus-4-6 to Anthropic
# → Response echoes back "gpt-5.4" in OpenAI format

# Route a Claude model to OpenAI
  -H "x-smartflow-provider: openai" \
  -d '{"model":"claude-sonnet-4-6","messages":[...]}'
# → Smartflow sends gpt-4.1 to OpenAI
Unlocks

A/B testing across providers, automatic failover to a different provider, and cost arbitrage — without changing any client code. One header, any destination.

2
March 2026 Model Translation Table
Models

Full bidirectional tier mappings for all current flagship, mid, and fast models:

OpenAI ModelTier→ Anthropic
gpt-5.4-proFlagship Proclaude-opus-4-6
gpt-5.4Flagshipclaude-opus-4-6
gpt-4.1Upper Midclaude-sonnet-4-6
gpt-4.1-mini / nanoFast / Cheapclaude-haiku-4-5-20251001
o3 / o4Reasoningclaude-opus-4-6
Anthropic ModelTier→ OpenAI
claude-opus-4-6Flagshipgpt-5.4
claude-sonnet-4-6Upper Midgpt-4.1
claude-haiku-4-5-20251001Fastgpt-4.1-mini

Ollama local models also mapped: llama3.3, phi4, deepseek-r1, qwen2.5:14b via x-smartflow-provider: ollama.

Observability
3
Per-Request Trace UINEW
Dashboard

New dashboard page (/dashboard/traces.html) surfaces every proxied request as a clickable trace row — timestamp, request ID, provider / model, latency, token count, cache outcome, and compliance status at a glance.


Clicking any row expands a five-tab detail panel: Overview (provider, model, latency breakdown, token usage), Prompt / Response (full content), Stage Timeline (per-stage latency bars), Guardrails (policy names, PII flags, risk score), and Routing (chain evaluated, fallback used). Toolbar supports search, provider filter, cache-hit filter, and sortable columns. Auto-refreshes every 30 seconds.

Unlocks

Debug individual requests end-to-end without touching server logs. Identify slow stages, unexpected routing decisions, compliance false positives, and cache misses — all from the dashboard.

4
Prometheus / OpenTelemetry Metrics EndpointNEW
Observability

GET /metrics on the management port (7778) now returns standard Prometheus text exposition format (v0.0.4). Scrape it directly with Prometheus, Grafana Agent, OTel Collector, Datadog Agent, or Victoria Metrics.


Metrics exported: smartflow_requests_total, smartflow_cache_hits_total, smartflow_cache_misses_total, smartflow_latency_p50/p90/p99_seconds, smartflow_tokens_input/output_total, smartflow_provider_errors_total, smartflow_cache_hit_rate, smartflow_cache_size_bytes.


Computed from live MetaCache Redis stats and the last 1,000 VAS log entries. No external dependency required. Caddy route already added on deployed instances: handle /metrics → localhost:7778.

Unlocks

Drop Smartflow into any existing Prometheus + Grafana observability stack. Wire latency SLOs, cache hit rate alerts, and token budget dashboards without any custom integration work.

5
VAS Log Detail Endpoint — GET /api/vas/logs/{id}
API

New endpoint returns the full VASLog record for a single request by ID — prompt content, response, all stage timings, policy IDs, cache metadata, and provider selection details. Used by the Trace UI detail panel and available for direct API access.


GET
/api/vas/logs/{id}
Full VASLog by request ID. Returns {"success":true,"data":VASLog} or 404.
GET
/api/vas/logs
Existing paginated list — now also powers the Trace UI table.
Identity & SSO
6
SSO Configuration Dashboard — No CLI RequiredNEW
Identity

New dashboard page (/dashboard/sso_config.html) lets administrators configure Entra ID / Okta / any OIDC provider entirely from the browser — no CLI, no Redis commands, no SSH access needed.


The page covers: provider selection, Tenant ID, Client ID, JWKS URI (auto-derived for Entra), Redirect URI, auto-provisioned team defaults (budget cap, TPM limit, allowed models), and sync-on-every-signin toggle. Reads from GET /api/auth/sso/config, saves via POST /api/auth/sso/config. Built-in Test Connection button, synced teams table, and CLI reference panel for automation.

Unlocks

SSO setup in under 2 minutes from any browser. The only server-side requirement is setting OIDC_CLIENT_SECRET as a container env var.

7
OIDC Authorization-Code Flow — Full Browser SSO
Identity

The management API now implements the complete OIDC authorization-code flow for browser-based single sign-on.


GET
/api/auth/sso/login
Constructs OIDC auth URL from config or env vars. Returns {"auth_url":"..."} for client redirect.
GET
/api/auth/sso/callback
Exchanges authorization code for id_token, syncs groups via SsoGroupSync, issues Smartflow JWT.
GET
/api/auth/sso/config
Returns current SSO config (tenant ID, client ID, team defaults). Secret never returned.
POST
/api/auth/sso/config
Saves SSO config to Redis. Idempotent — safe to call on every deploy.

Flow: sso_login.html/api/auth/sso/login → IdP redirect → callback → /api/auth/sso/callback → Smartflow JWT → dashboard. Entra groups auto-synced as Smartflow teams on sign-in.

Unlocks

Full enterprise SSO for the dashboard. New employees get access the moment they are added to the Entra group — zero admin touch per user.

8
SSO Login Page — sso_login.html
Dashboard

New dashboard login page dynamically shows SSO buttons for configured providers (Microsoft, Okta, generic OIDC) based on GET /api/auth/sso/config. Handles the OIDC callback automatically — detects ?code=, exchanges via /api/auth/sso/callback, and redirects to the dashboard on success. Falls back to API key login for non-SSO deployments or service accounts.

Bug Fixes
9
Fix: Provider Key Injection on Provider Override
Bug Fix
Root cause: When x-smartflow-provider overrode the target provider, the proxy called get_api_key() on the new provider but this path returned None when any auth header was present in the original request — resulting in "no API key" errors for cross-provider routing.

Fix: When a provider override is in effect, the proxy now uses final_api_key directly from the key store for the target provider, bypassing the auth header check entirely.
Impact Before Fix

Any request using x-smartflow-provider to route Anthropic→OpenAI (or vice versa) returned a 401/500 error. Cross-provider routing was non-functional.

10
Fix: max_completion_tokens for GPT-5.x and O3/O4 Models
Bug Fix
Root cause: The Anthropic→OpenAI body transformer emitted max_tokens for all models. OpenAI's updated API contract for GPT-5.x and O3/O4 reasoning models requires max_completion_tokensmax_tokens is silently ignored or returns a validation error.

Fix: Transformer detects GPT-5.x and O3/O4 model families and emits max_completion_tokens instead. GPT-4.x and earlier continue to use max_tokens for backward compatibility.
Impact Before Fix

Any cross-provider request targeting GPT-5.4 or GPT-5.4-pro ignored the token limit, potentially returning full untruncated model responses and inflating costs.

Release Summary
#Feature / FixArea
1Any-to-any provider routingx-smartflow-provider header, automatic model tier translation (OpenAI ↔ Anthropic ↔ Ollama)Routing
2March 2026 model table — GPT-5.4/pro, GPT-4.1/mini/nano, Claude Opus 4.6, Sonnet 4.6, Haiku 4.5, O3/O4 reasoningModels
3Per-request Trace UItraces.html with 5-tab detail panel, stage timeline, guardrail view, routing drill-downDashboard
4Prometheus /metrics endpointGET /metrics on port 7778, standard text/plain 0.0.4, 8 metrics, Grafana-readyObservability
5VAS log detail APIGET /api/vas/logs/{id} returns full VASLog record by request IDAPI
6SSO config dashboardsso_config.html: browser-based OIDC config, test connection, synced teams, CLI referenceIdentity
7OIDC authorization-code flowGET /api/auth/sso/login + /api/auth/sso/callback: full browser SSO with group sync and JWT issuanceIdentity
8SSO login pagesso_login.html: dynamic provider buttons, OIDC callback handler, API key fallbackDashboard
9GET + POST /api/auth/sso/config — read/write SSO config in Redis; idempotent, no restart requiredAPI
10Fix: Provider key injection on x-smartflow-provider override — cross-provider routing now injects correct API keyBug Fix
11Fix: max_completion_tokens for GPT-5.x / O3/O4 — body transformer emits correct parameter for new OpenAI modelsBug Fix