Skip to content

feat: enrich realtime routing, logging, cost, and session tracking - #3335

Merged
akshaydeo merged 3 commits into
devfrom
feat/05-08-feat_enrich_realtime_routing_logging_cost_and_session_tracking
May 14, 2026
Merged

feat: enrich realtime routing, logging, cost, and session tracking#3335
akshaydeo merged 3 commits into
devfrom
feat/05-08-feat_enrich_realtime_routing_logging_cost_and_session_tracking

Conversation

@danpiths

@danpiths danpiths commented May 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

Closes multiple gaps in realtime observability so that realtime turns have the
same logging richness as normal LLM calls: routing engine logs, tool
definitions, voice/transport metadata, cost calculation, and proper context
propagation through the turn lifecycle.

Changes

  • Governance routing for realtime (plugins/governance/main.go): Added
    governRealtimeQueryParam so realtime WebSocket requests participate in
    routing rules and virtual key governance via query param model resolution
  • WebSocket middleware context propagation (handlers/wsrealtime.go): Added
    snapshotRealtimeMiddlewareValues / applyRealtimeMiddlewareValues to
    capture governance context values from the HTTP middleware and propagate them
    to the WebSocket session context. Processes model catalog resolution to
    generate routing engine log entries. Computes raw storage flag via
    ComputeRawStorageForProvider
  • WebRTC middleware context propagation (handlers/webrtc_realtime.go):
    Same propagation for WebRTC relay. Added nested model prefix stripping for
    legacy /v1/realtime POST path. Added model catalog auto-resolution for bare
    models
  • Client secrets operational logging
    (handlers/realtime_client_secrets.go): Added model catalog auto-resolution
    and operational logs (Info for requests/success, Error for failures)
  • Session tool and voice tracking (websocket/session.go): Added
    realtimeSessionTools and realtimeVoice fields with getters/setters.
    Replaced strings.Contains dedup with replace-with-latest strategy for tool
    output events. Added close guards on mutating methods. Close() now nils all
    accumulated data
  • Turn pipeline enrichment (handlers/realtime_turn_pipeline.go): Added
    updateRealtimeSessionFromEvent to track tools, voice, and strip nested model
    prefixes from session events. Updated buildRealtimeTurnPreRequest to attach
    session tools. Added restoreRealtimeTurnTraceContext and
    applyRealtimeRawStorageContext for context propagation. Rewrote
    buildRealtimeTurnOutputMessages to merge provider extractor output with raw
    response.done payload so both text and tool calls appear
  • Logging plugin fixes (plugins/logging/main.go): Added nil check for
    ResponsesRequest.Params before iterating tools (fixed panic). Moved
    realtime-specific PostLLMHook enrichment to run after routingEngineLogs
    extraction so routing engine decision logs are populated
  • Voice/transport metadata (plugins/logging/utils.go):
    mergeRealtimeMetadata now writes realtime_voice and realtime_transport
  • Cost calculation (framework/modelcatalog/pricing.go): Added
    RealtimeRequest to calculateBaseCost. computeTextCost now subtracts
    audio tokens from text counts and prices them at
    InputCostPerAudioToken/OutputCostPerAudioToken rates. Added AudioTokens
    mapping for output token details
  • Core exports (core/bifrost.go, core/schemas/bifrost.go): Added
    ComputeRawStorageForProvider method and
    BifrostContextKeyRealtimeVoice/BifrostContextKeyRealtimeTransport context
    keys
  • Tests: Added dedup behavior tests, output message merging tests, updated
    existing test expectations

Type of change

  • Bug fix
  • Feature
  • Refactor
  • Documentation
  • Chore/CI

Affected areas

  • Core (Go)
  • Transports (HTTP)
  • Providers/Integrations
  • Plugins
  • UI (React)
  • Docs

How to test

# Handler tests (covers turn pipeline, dedup, output merging)
go test ./transports/bifrost-http/handlers/ -count=1 -v

# Logging plugin tests
go test ./plugins/logging/ -count=1 -v

# Cost calculation tests
go test ./framework/modelcatalog/ -count=1 -v

# Full build
make build LOCAL=1

Manual verification:

  1. Send a bare model like gpt-4o-realtime-preview-2025-06-03 to /v1/realtime
    — verify routing engine logs show model catalog resolution in the Logs UI
  2. Use a virtual key — verify virtual key info appears in the log entry
  3. Have the model make a tool call alongside a text response — verify both
    appear in the log output
  4. Check the cost column shows non-zero values for realtime turns
  5. Verify tool definitions from session.update appear in the log's "Tools"
    field

Screenshots/Recordings

N/A

Breaking changes

  • Yes
  • No

Related issues

N/A

Security considerations

ComputeRawStorageForProvider is a read-only method that checks provider
config. No new auth surfaces or secret handling.

Checklist

  • I read docs/contributing/README.md and followed the guidelines
  • I added/updated tests where appropriate
  • I updated documentation where needed
  • I verified builds succeed (Go and UI)
  • I verified the CI pipeline passes locally if applicable

@danpiths
danpiths requested a review from akshaydeo May 8, 2026 14:11

danpiths commented May 8, 2026

Copy link
Copy Markdown
Collaborator Author

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@coderabbitai

coderabbitai Bot commented May 8, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b9c6b70d-4fe6-4bef-b9bd-5dd2ab941327

📥 Commits

Reviewing files that changed from the base of the PR and between 6e910cd and 5e00d3f.

📒 Files selected for processing (14)
  • core/bifrost.go
  • core/schemas/bifrost.go
  • framework/modelcatalog/pricing.go
  • plugins/governance/main.go
  • plugins/logging/main.go
  • plugins/logging/utils.go
  • transports/bifrost-http/handlers/realtime_client_secrets.go
  • transports/bifrost-http/handlers/realtime_client_secrets_test.go
  • transports/bifrost-http/handlers/realtime_logging_test.go
  • transports/bifrost-http/handlers/realtime_turn_pipeline.go
  • transports/bifrost-http/handlers/webrtc_realtime.go
  • transports/bifrost-http/handlers/webrtc_realtime_test.go
  • transports/bifrost-http/handlers/wsrealtime.go
  • transports/bifrost-http/websocket/session.go
✅ Files skipped from review due to trivial changes (2)
  • core/schemas/bifrost.go
  • core/bifrost.go
🚧 Files skipped from review as they are similar to previous changes (11)
  • plugins/logging/utils.go
  • framework/modelcatalog/pricing.go
  • transports/bifrost-http/handlers/webrtc_realtime_test.go
  • transports/bifrost-http/handlers/realtime_client_secrets_test.go
  • plugins/governance/main.go
  • transports/bifrost-http/handlers/realtime_logging_test.go
  • transports/bifrost-http/handlers/realtime_client_secrets.go
  • transports/bifrost-http/websocket/session.go
  • transports/bifrost-http/handlers/wsrealtime.go
  • plugins/logging/main.go
  • transports/bifrost-http/handlers/realtime_turn_pipeline.go

📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Per-provider + per-request raw request/response capture with consistent apply/restore across realtime flows; per-request overrides honored
    • Audio-token-aware billing folded into text/chat pricing
    • Model-catalog auto-resolution for realtime requests (including legacy /v1/realtime and query-param routing)
    • Realtime transport & voice metadata, improved session tools/voice tracking, and stronger session shutdown cleanup
  • Bug Fixes

    • Preserve trace context across realtime pre/post hooks and relays
    • Prevent nil derefs when populating realtime params; deduplicate realtime outputs and function-call messages
  • Logging & Governance

    • Enhanced realtime request logging and governance routing; clearer client-secret minting logs
  • Tests

    • Added/updated realtime tests for session dedupe, turn parsing, SDP/target resolution, and client-secret resolution

Walkthrough

This PR extends realtime request infrastructure across WebRTC and WebSocket transports, adding model-catalog auto-resolution, session tool/voice tracking, trace/raw-store preservation, per-provider raw payload storage computation with per-request overrides, and audio token billing.

Changes

Realtime Request Support with Audio Billing and Transport Integration

Layer / File(s) Summary
Context Keys & Raw Storage Config
core/schemas/bifrost.go, core/bifrost.go
New BifrostContextKeyRealtimeTransport and BifrostContextKeyRealtimeVoice constants. ComputeRawStorageForProvider helper merges provider config and per-request context overrides to determine effective raw payload storage.
Audio Token Billing
framework/modelcatalog/pricing.go
calculateBaseCost routes RealtimeRequest through text-cost calculation. responsesUsageToBifrostUsage copies AudioTokens from output details. computeTextCost computes audio token cost delta using prompt/completion audio token counts and per-audio-token rates.
Governance for Query-Param Realtime
plugins/governance/main.go
HTTPTransportPreHook detects bodyless realtime requests with model query parameter, delegates to governRealtimeQueryParam, which constructs a synthetic payload, applies routing rules and VK load-balancing, then propagates rewritten model back to query params.
Realtime Client Secrets Resolution
transports/bifrost-http/handlers/realtime_client_secrets.go
Handler/resolver updated to accept request ctx and config. Supports model-catalog auto-resolution for bare models, records resolution metadata in request context, and emits structured logs for requests and upstream responses. Tests updated to pass ctx/config.
Realtime Turn Pipeline Helpers
transports/bifrost-http/handlers/realtime_turn_pipeline.go
Adds helpers to apply/restore raw-storage flags and trace context, sanitize session events (strip nested model prefixes, extract voice), refresh session tools/voice from events, include session tools in pre-requests, and deduplicate function-call outputs.
Turn Hook Lifecycle
transports/bifrost-http/handlers/realtime_turn_pipeline.go
Start hooks compute raw storage and voice, persist TraceID/RawStore to plugin state. Finalize and error-finalize paths restore trace context and re-apply raw storage across success and error flows.
WebRTC Transport Handler
transports/bifrost-http/handlers/webrtc_realtime.go
Registers legacy /v1/realtime base route. Parsing/resolution now accepts config for model-catalog auto-resolution of bare models, strips nested OpenAI model prefixes, computes/applies raw-storage and middleware values into relay context, and records session tools from events.
WebSocket Transport Handler
transports/bifrost-http/handlers/wsrealtime.go
Snapshots middleware governance/routing/user values before request context recycle, resolves provider/model using request context with model-catalog auto-resolution, restores captured middleware into session BifrostContext, computes session raw-store override, tags transport type, and tracks session tools from relayed events.
Realtime Client Secrets & WebRTC Tests
transports/bifrost-http/handlers/*_test.go
Client secret and WebRTC resolver tests updated to new ctx/config signatures. Additional tests added for realtime nested raw-event dedupe and response.done merging of text+function_call.
Logging & Realtime Metadata
plugins/logging/main.go, plugins/logging/utils.go
PreLLMHook guards nil ResponsesRequest.Params. PostLLMHook consolidates realtime metadata and routing-engine usage. mergeRealtimeMetadata adds realtime_transport and realtime_voice.
Extended Session State
transports/bifrost-http/websocket/session.go
Session stores latest realtime tools (json.RawMessage) and voice; RealtimeTurnPluginState adds TraceID and RawStore. recordRealtimeTurnInput overwrites Raw for same (itemID, role) and guards closed sessions. Close() clears realtime state.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • maximhq/bifrost#2341: Related realtime transport changes touching the realtime turn pipeline and handlers; overlaps with session/turn processing updates in this PR.

Suggested reviewers

  • akshaydeo

Poem

🐰 Hops through realtime streams so bright,
Audio tokens counted in the night;
WebSocket and WebRTC keep time,
Trace and tools aligned in rhyme,
A rabbit cheers the realtime climb!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 12.20% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: adding enrichment to realtime routing, logging, cost calculation, and session tracking features.
Description check ✅ Passed The description is comprehensive and follows the template structure with all major sections completed: Summary, Changes, Type of change, Affected areas, How to test, Breaking changes, Related issues, Security considerations, and Checklist.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/05-08-feat_enrich_realtime_routing_logging_cost_and_session_tracking

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 golangci-lint (2.12.2)

level=error msg="[linters_context] typechecking error: pattern ./...: directory prefix . does not contain main module or its selected dependencies"

Warning

Review ran into problems

🔥 Problems

Stopped waiting for pipeline failures after 30000ms. One of your pipelines takes longer than our 30000ms fetch window to run, so review may not consider pipeline-failure results for inline comments if any failures occurred after the fetch window. Increase the timeout if you want to wait longer or run a @coderabbit review after the pipeline has finished.

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Comment @coderabbitai help to get the list of available commands and usage tips.

@greptile-apps

greptile-apps Bot commented May 8, 2026

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5

Safe to merge. All changes are additive observability enrichments; no existing call paths are altered in a way that would change behavior for non-realtime requests.

The core context-propagation logic (snapshot before WebSocket upgrade, apply after fresh context creation) is carefully ordered and protected against stale overwrites. Audio cost computation uses a mathematically correct delta adjustment to avoid double-counting text-rate tokens. Session state mutations are properly guarded by the existing RWMutex and closed-session checks. The dedup strategy for function-call outputs is well-keyed and exercised by the new merge test. The governance realtime path follows the same nil-VK conventions as the existing body-based path.

No files require special attention. The only outstanding nit — the unreachable errRealtimeDeploymentFormat variable in wsrealtime.go — was flagged in a prior review round and does not affect correctness.

Important Files Changed

Filename Overview
transports/bifrost-http/handlers/wsrealtime.go Adds middleware context snapshot/apply for WebSocket sessions, model catalog auto-resolution, raw storage computation, and transport-type tagging. The unused errRealtimeDeploymentFormat variable (flagged in a previous review) is not addressed in this diff.
transports/bifrost-http/handlers/realtime_turn_pipeline.go Adds session tool/voice propagation to turn pre-requests, trace context restoration, raw storage context application, and reworked output message merging with correct dedup logic. Well-structured and consistent with existing patterns.
transports/bifrost-http/handlers/webrtc_realtime.go Mirrors WebSocket changes for WebRTC relay: middleware context propagation, model catalog resolution, nested model prefix stripping on /v1/realtime POST, and session tool/voice tracking.
transports/bifrost-http/websocket/session.go Adds thread-safe realtimeSessionTools and realtimeVoice fields with proper RWMutex guards and closed-session guards. Replaces raw-event concatenation with a latest-wins strategy and clears accumulated data on Close().
plugins/governance/main.go Adds governRealtimeQueryParam to route bodyless WebSocket upgrade requests through governance. Correctly propagates model rewrites back to the query parameter and follows the same nil-VK handling as the normal body path.
framework/modelcatalog/pricing.go Adds RealtimeRequest to text cost routing and correctly computes audio token costs as a delta adjustment over base text rates to avoid double-counting.
plugins/logging/main.go Adds nil guard for ResponsesRequest.Params before tool iteration in the RealtimeRequest case, and moves realtime-specific PostLLMHook enrichment to after routing engine log extraction to ensure logs are populated.
core/bifrost.go Exports ComputeRawStorageForProvider as a read-only method mirroring the internal executeRequest computation, with proper nil guards.
transports/bifrost-http/handlers/realtime_client_secrets.go Adds model catalog auto-resolution for bare model names and operational Info/Error logs around request lifecycle events.

Reviews (7): Last reviewed commit: "feat: enrich realtime routing, logging, ..." | Re-trigger Greptile

Comment thread transports/bifrost-http/handlers/realtime_turn_pipeline.go

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 8

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
transports/bifrost-http/handlers/realtime_client_secrets.go (1)

162-167: ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Guard nil upstream responses before dereferencing resp.

At Line 162, resp.StatusCode (and at Line 166, resp.Body) is read before any nil check. If a provider returns (nil, nil), this panics instead of returning the intended structured error response.

Proposed fix
 	resp, bifrostErr := sessionProvider.CreateRealtimeClientSecret(bifrostCtx, key, route.EndpointType, normalizedBody)
 	if bifrostErr != nil {
 		logger.Error("[realtime-client-secrets] upstream error: provider=%s model=%s error=%s",
 			providerKey, model, bifrostErr.Error)
 		SendBifrostError(ctx, bifrostErr)
 		return
 	}
+	if resp == nil {
+		writeRealtimeClientSecretResponse(ctx, resp)
+		return
+	}
 
 	logger.Info("[realtime-client-secrets] upstream success: provider=%s model=%s status=%d",
 		providerKey, model, resp.StatusCode)
 	cacheRealtimeEphemeralKeyMapping(
 		h.handlerStore.GetKVStore(),
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@transports/bifrost-http/handlers/realtime_client_secrets.go` around lines 162
- 167, The code dereferences resp (resp.StatusCode and resp.Body) before
checking for nil which can panic if the upstream returns (nil, nil); update the
handler (the block that logs "[realtime-client-secrets] upstream success" and
calls cacheRealtimeEphemeralKeyMapping) to first guard that resp != nil, and if
nil return the intended structured error response (rather than proceeding),
otherwise read resp.StatusCode and resp.Body and then call
cacheRealtimeEphemeralKeyMapping(h.handlerStore.GetKVStore(), resp.Body,
key.ID); ensure the nil-check happens immediately after the upstream call that
produces resp.
plugins/governance/main.go (1)

679-688: ⚠️ Potential issue | 🟠 Major | 🏗️ Heavy lift

Replace raw "model" / "modelId" context keys with typed identifiers.

The new realtime query-param flow now depends on these rewrites, but they still travel through ctx.Value("model"), ctx.Value("modelId"), and matching ctx.SetValue(...) calls with raw strings. That makes the routing contract collision-prone and violates the repo-wide context-key rule. Please move these to dedicated typed keys and update both the read and write sites together.

As per coding guidelines, "Rule: No raw context keys in Go" and "The key passed to WithValue/Value MUST be that typed identifier."

Also applies to: 842-845, 999-1007

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/governance/main.go` around lines 679 - 688, Replace raw string
context keys "model" and "modelId" with dedicated typed context key identifiers
and update all read/write sites. Define a typed key type (e.g., type contextKey
string) and package-level vars like modelCtxKey and modelIDCtxKey, then change
reads from ctx.Value("model") and ctx.Value("modelId") to ctx.Value(modelCtxKey)
/ ctx.Value(modelIDCtxKey) and change all corresponding ctx.SetValue(...) calls
to use those typed keys. Update every occurrence mentioned (the branch using
modelValue, the bedrock branch with isBedrockPath, and the other sites around
the ranges you noted) so both the WithValue/SetValue and Value calls use the
same typed identifiers and leave other logic (e.g., falling back to
req.CaseInsensitivePathParamLookup or modelId path extraction) intact.
🧹 Nitpick comments (1)
transports/bifrost-http/handlers/realtime_client_secrets_test.go (1)

68-70: ⚡ Quick win

Add one positive test for model-catalog auto-resolution behavior.

These updated call sites always pass &lib.Config{} with no catalog data, so the new auto-resolution branch is still untested. Please add a case that configures providers for a bare model and asserts both resolved provider selection and FastHTTPUserValueModelCatalogResolution being set on the request context.

Also applies to: 122-124

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@transports/bifrost-http/handlers/realtime_client_secrets_test.go` around
lines 68 - 70, Add a positive table-driven test case in
realtime_client_secrets_test.go that exercises
resolveRealtimeClientSecretTarget's model-catalog auto-resolution branch by
supplying a lib.Config with a minimal ModelCatalog entry mapping the bare model
name to providers; call resolveRealtimeClientSecretTarget(&ctx, &cfg, tt.route,
tt.body) (use the same gotProvider, gotModel, err variables) and assert no
error, that gotProvider equals the expected provider for the bare model, that
gotModel reflects the resolved catalog model, and that
ctx.UserValue(FastHTTPUserValueModelCatalogResolution) is set (non-nil/true) to
verify the FastHTTPUserValueModelCatalogResolution side-effect.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@core/bifrost.go`:
- Around line 4143-4152: ComputeRawStorageForProvider calls ctx.Value without
guarding against a nil ctx which can panic; update the function
(ComputeRawStorageForProvider on type Bifrost) to first ensure ctx is non-nil by
defaulting to bifrost.ctx when ctx == nil, then proceed to read ctx.Value(...)
for BifrostContextKeyAllowPerRequestStorageOverride and
BifrostContextKeyStoreRawRequestResponse so the exported helper is safe for
callers that pass a nil context.
- Around line 4155-4164: The current block in core/bifrost.go sets
effectiveStore = true whenever send-back raw flags (ctx values
BifrostContextKeySendBackRawRequest or BifrostContextKeySendBackRawResponse) are
present, which wrongly couples send-back with persistent log storage; remove the
branches that set effectiveStore based on those send-back keys and ensure
effectiveStore is only controlled by the explicit storage-related flags (e.g.,
the existing BifrostContextKeyStoreRawRequest/BifrostContextKeyStoreRawResponse
logic or other storage-specific checks), keeping the allowRawOverride and
send-back checks only to gate send-back behavior and not mutate effectiveStore.

In `@framework/modelcatalog/pricing.go`:
- Around line 565-591: The audio token counts
(inputAudioTokens/outputAudioTokens) must be clamped to the actual token totals
before applying the audio-rate delta to avoid over/negative billing: when
computing audioCost, replace the raw usage.PromptTokensDetails.AudioTokens and
usage.CompletionTokensDetails.AudioTokens with min(audioTokens,
usage.PromptTokensDetails.PromptTokens) and min(audioTokens,
usage.CompletionTokensDetails.CompletionTokens) respectively (and treat nil
totals as 0), then proceed with the existing checks against
pricing.InputCostPerAudioToken and pricing.OutputCostPerAudioToken and compute
audioCost using these clamped values.

In `@plugins/governance/main.go`:
- Around line 358-365: The branch that handles bodyless realtime requests only
checks req.Query["model"] and calls p.governRealtimeQueryParam, so requests that
specify a deployment via req.Query["deployment"] are not processed; modify the
logic where len(req.Body) == 0 (and the similar block around lines 586-645) to
detect either req.Query["model"] or req.Query["deployment"], call
p.governRealtimeQueryParam for both cases, and ensure that any rewrite performed
by governRealtimeQueryParam is written back to the same query key that was
present (i.e., if the incoming param was "deployment" update
req.Query["deployment"], if it was "model" update req.Query["model"]) so routing
rules and virtual key load-balancing apply uniformly.

In `@transports/bifrost-http/handlers/realtime_turn_pipeline.go`:
- Around line 154-158: The synthetic pre-request builder drops explicit "clear
tools" semantics because buildRealtimeTurnPreRequest only sets Params.Tools when
len(tools) > 0; change it to set Params.Tools whenever tools != nil (allow empty
slice) so an explicit [] is preserved, matching updateRealtimeSessionFromEvent
which calls session.SetRealtimeSessionTools when event.Session.Tools != nil;
apply the same nil-vs-empty check in the other occurrence noted (the similar
block around the lines indicated) so turn hooks/logging receive [] for clears
instead of nil.

In `@transports/bifrost-http/handlers/webrtc_realtime.go`:
- Around line 168-179: The code currently pins bare-model /v1/realtime requests
to providers[0] during catalog auto-resolution (see providerKey,
config.GetProvidersForModel and lib.FastHTTPUserValueModelCatalogResolution /
ModelCatalogResolution), which bypasses later governance/key selection; remove
the eager assignment of providerKey = providers[0] and instead only store the
ModelCatalogResolution with Model, AllProviders (and optionally ResolvedProvider
left empty or nil) so downstream functions (handleLegacyRequest,
resolveRealtimeSDPTarget) and the governance/key selection can choose the
correct provider; in short, keep the provider list in the user value but do not
set providerKey to providers[0].
- Around line 1117-1127: The relay context created by newRealtimeRelayContext is
missing propagation of per-request storage/logging controls: add
schemas.BifrostContextKeyAllowPerRequestStorageOverride and
schemas.BifrostContextKeyDisableContentLogging to the keys you copy from
requestCtx into relayCtx (the same place you already copy
BifrostContextKeyShouldStoreRawInLogs and set
BifrostContextKeyRealtimeTransport) so downstream realtime logging respects
HTTP-level content-logging overrides.

In `@transports/bifrost-http/handlers/wsrealtime.go`:
- Around line 292-293: The code currently calls
updateRealtimeSessionFromEvent(session, event) before
provider.ToProviderRealtimeEvent(event), causing session metadata (tools/voice)
to be written even if provider validation fails; change the flow so any
normalization/extraction logic needed for translation is done without mutating
session (e.g., add a pure helper like normalizeSessionFromEvent or have
updateRealtimeSessionFromEvent return the normalized metadata), then call
provider.ToProviderRealtimeEvent(event) and only if that call succeeds apply the
session-state write (updateRealtimeSessionFromEvent or a
session.ApplyNormalizedMetadata method) to persist tools/voice into the
websocket session; ensure provider.ToProviderRealtimeEvent is the gatekeeper for
committing session changes.

---

Outside diff comments:
In `@plugins/governance/main.go`:
- Around line 679-688: Replace raw string context keys "model" and "modelId"
with dedicated typed context key identifiers and update all read/write sites.
Define a typed key type (e.g., type contextKey string) and package-level vars
like modelCtxKey and modelIDCtxKey, then change reads from ctx.Value("model")
and ctx.Value("modelId") to ctx.Value(modelCtxKey) / ctx.Value(modelIDCtxKey)
and change all corresponding ctx.SetValue(...) calls to use those typed keys.
Update every occurrence mentioned (the branch using modelValue, the bedrock
branch with isBedrockPath, and the other sites around the ranges you noted) so
both the WithValue/SetValue and Value calls use the same typed identifiers and
leave other logic (e.g., falling back to req.CaseInsensitivePathParamLookup or
modelId path extraction) intact.

In `@transports/bifrost-http/handlers/realtime_client_secrets.go`:
- Around line 162-167: The code dereferences resp (resp.StatusCode and
resp.Body) before checking for nil which can panic if the upstream returns (nil,
nil); update the handler (the block that logs "[realtime-client-secrets]
upstream success" and calls cacheRealtimeEphemeralKeyMapping) to first guard
that resp != nil, and if nil return the intended structured error response
(rather than proceeding), otherwise read resp.StatusCode and resp.Body and then
call cacheRealtimeEphemeralKeyMapping(h.handlerStore.GetKVStore(), resp.Body,
key.ID); ensure the nil-check happens immediately after the upstream call that
produces resp.

---

Nitpick comments:
In `@transports/bifrost-http/handlers/realtime_client_secrets_test.go`:
- Around line 68-70: Add a positive table-driven test case in
realtime_client_secrets_test.go that exercises
resolveRealtimeClientSecretTarget's model-catalog auto-resolution branch by
supplying a lib.Config with a minimal ModelCatalog entry mapping the bare model
name to providers; call resolveRealtimeClientSecretTarget(&ctx, &cfg, tt.route,
tt.body) (use the same gotProvider, gotModel, err variables) and assert no
error, that gotProvider equals the expected provider for the bare model, that
gotModel reflects the resolved catalog model, and that
ctx.UserValue(FastHTTPUserValueModelCatalogResolution) is set (non-nil/true) to
verify the FastHTTPUserValueModelCatalogResolution side-effect.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b92cbc48-9758-4327-933f-c94488200b23

📥 Commits

Reviewing files that changed from the base of the PR and between ddc3e56 and df8eea6.

📒 Files selected for processing (14)
  • core/bifrost.go
  • core/schemas/bifrost.go
  • framework/modelcatalog/pricing.go
  • plugins/governance/main.go
  • plugins/logging/main.go
  • plugins/logging/utils.go
  • transports/bifrost-http/handlers/realtime_client_secrets.go
  • transports/bifrost-http/handlers/realtime_client_secrets_test.go
  • transports/bifrost-http/handlers/realtime_logging_test.go
  • transports/bifrost-http/handlers/realtime_turn_pipeline.go
  • transports/bifrost-http/handlers/webrtc_realtime.go
  • transports/bifrost-http/handlers/webrtc_realtime_test.go
  • transports/bifrost-http/handlers/wsrealtime.go
  • transports/bifrost-http/websocket/session.go

Comment thread core/bifrost.go
Comment thread core/bifrost.go Outdated
Comment thread framework/modelcatalog/pricing.go
Comment thread plugins/governance/main.go
Comment thread transports/bifrost-http/handlers/realtime_turn_pipeline.go
Comment thread transports/bifrost-http/handlers/webrtc_realtime.go
Comment thread transports/bifrost-http/handlers/webrtc_realtime.go
Comment thread transports/bifrost-http/handlers/wsrealtime.go Outdated
@danpiths
danpiths force-pushed the feat/05-08-feat_enrich_realtime_routing_logging_cost_and_session_tracking branch from df8eea6 to e7fe056 Compare May 13, 2026 06:46
@danpiths
danpiths force-pushed the feat/05-08-feat_add_azure_realtime_provider_and_nested_model_normalization branch from ddc3e56 to a1a3812 Compare May 13, 2026 06:46
@danpiths
danpiths force-pushed the feat/05-08-feat_enrich_realtime_routing_logging_cost_and_session_tracking branch from e7fe056 to 357cbf4 Compare May 13, 2026 07:35
@danpiths
danpiths force-pushed the feat/05-08-feat_add_azure_realtime_provider_and_nested_model_normalization branch from a1a3812 to b5b4f19 Compare May 13, 2026 07:35
@danpiths
danpiths force-pushed the feat/05-08-feat_enrich_realtime_routing_logging_cost_and_session_tracking branch 2 times, most recently from 15d4b2d to e6d5cd1 Compare May 13, 2026 10:20
@danpiths
danpiths force-pushed the feat/05-08-feat_add_azure_realtime_provider_and_nested_model_normalization branch from b5b4f19 to d256aa3 Compare May 13, 2026 10:20
coderabbitai[bot]
coderabbitai Bot previously approved these changes May 13, 2026
@danpiths
danpiths force-pushed the feat/05-08-feat_enrich_realtime_routing_logging_cost_and_session_tracking branch from e6d5cd1 to 6e910cd Compare May 14, 2026 10:38
@danpiths
danpiths force-pushed the feat/05-08-feat_add_azure_realtime_provider_and_nested_model_normalization branch from d256aa3 to 34a893c Compare May 14, 2026 10:38
akshaydeo
akshaydeo previously approved these changes May 14, 2026
@danpiths
danpiths force-pushed the feat/05-08-feat_add_azure_realtime_provider_and_nested_model_normalization branch from 34a893c to de6e290 Compare May 14, 2026 13:34
@danpiths
danpiths force-pushed the feat/05-08-feat_enrich_realtime_routing_logging_cost_and_session_tracking branch from 6e910cd to 5e00d3f Compare May 14, 2026 13:34
@danpiths
danpiths requested a review from akshaydeo May 14, 2026 13:34

akshaydeo commented May 14, 2026

Copy link
Copy Markdown
Contributor

Merge activity

  • May 14, 1:58 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • May 14, 2:01 PM UTC: @akshaydeo merged this pull request with Graphite.

@akshaydeo
akshaydeo changed the base branch from feat/05-08-feat_add_azure_realtime_provider_and_nested_model_normalization to graphite-base/3335 May 14, 2026 14:00
@akshaydeo
akshaydeo changed the base branch from graphite-base/3335 to dev May 14, 2026 14:00
@akshaydeo
akshaydeo dismissed stale reviews from coderabbitai[bot] and themself May 14, 2026 14:00

The base branch was changed.

@akshaydeo
akshaydeo requested a review from a team as a code owner May 14, 2026 14:00
@akshaydeo
akshaydeo merged commit 3325f4b into dev May 14, 2026
14 of 15 checks passed
@akshaydeo
akshaydeo deleted the feat/05-08-feat_enrich_realtime_routing_logging_cost_and_session_tracking branch May 14, 2026 14:01
akshaydeo pushed a commit that referenced this pull request May 15, 2026
…3335)

## Summary

Closes multiple gaps in realtime observability so that realtime turns have the
same logging richness as normal LLM calls: routing engine logs, tool
definitions, voice/transport metadata, cost calculation, and proper context
propagation through the turn lifecycle.

## Changes

- **Governance routing for realtime** (`plugins/governance/main.go`): Added
  `governRealtimeQueryParam` so realtime WebSocket requests participate in
  routing rules and virtual key governance via query param model resolution
- **WebSocket middleware context propagation** (`handlers/wsrealtime.go`): Added
  `snapshotRealtimeMiddlewareValues` / `applyRealtimeMiddlewareValues` to
  capture governance context values from the HTTP middleware and propagate them
  to the WebSocket session context. Processes model catalog resolution to
  generate routing engine log entries. Computes raw storage flag via
  `ComputeRawStorageForProvider`
- **WebRTC middleware context propagation** (`handlers/webrtc_realtime.go`):
  Same propagation for WebRTC relay. Added nested model prefix stripping for
  legacy `/v1/realtime` POST path. Added model catalog auto-resolution for bare
  models
- **Client secrets operational logging**
  (`handlers/realtime_client_secrets.go`): Added model catalog auto-resolution
  and operational logs (Info for requests/success, Error for failures)
- **Session tool and voice tracking** (`websocket/session.go`): Added
  `realtimeSessionTools` and `realtimeVoice` fields with getters/setters.
  Replaced `strings.Contains` dedup with replace-with-latest strategy for tool
  output events. Added close guards on mutating methods. `Close()` now nils all
  accumulated data
- **Turn pipeline enrichment** (`handlers/realtime_turn_pipeline.go`): Added
  `updateRealtimeSessionFromEvent` to track tools, voice, and strip nested model
  prefixes from session events. Updated `buildRealtimeTurnPreRequest` to attach
  session tools. Added `restoreRealtimeTurnTraceContext` and
  `applyRealtimeRawStorageContext` for context propagation. Rewrote
  `buildRealtimeTurnOutputMessages` to merge provider extractor output with raw
  `response.done` payload so both text and tool calls appear
- **Logging plugin fixes** (`plugins/logging/main.go`): Added nil check for
  `ResponsesRequest.Params` before iterating tools (fixed panic). Moved
  realtime-specific PostLLMHook enrichment to run after `routingEngineLogs`
  extraction so routing engine decision logs are populated
- **Voice/transport metadata** (`plugins/logging/utils.go`):
  `mergeRealtimeMetadata` now writes `realtime_voice` and `realtime_transport`
- **Cost calculation** (`framework/modelcatalog/pricing.go`): Added
  `RealtimeRequest` to `calculateBaseCost`. `computeTextCost` now subtracts
  audio tokens from text counts and prices them at
  `InputCostPerAudioToken`/`OutputCostPerAudioToken` rates. Added `AudioTokens`
  mapping for output token details
- **Core exports** (`core/bifrost.go`, `core/schemas/bifrost.go`): Added
  `ComputeRawStorageForProvider` method and
  `BifrostContextKeyRealtimeVoice`/`BifrostContextKeyRealtimeTransport` context
  keys
- **Tests**: Added dedup behavior tests, output message merging tests, updated
  existing test expectations

## Type of change

- [x] Bug fix
- [x] Feature
- [ ] Refactor
- [ ] Documentation
- [ ] Chore/CI

## Affected areas

- [x] Core (Go)
- [x] Transports (HTTP)
- [ ] Providers/Integrations
- [x] Plugins
- [ ] UI (React)
- [ ] Docs

## How to test

```sh
# Handler tests (covers turn pipeline, dedup, output merging)
go test ./transports/bifrost-http/handlers/ -count=1 -v

# Logging plugin tests
go test ./plugins/logging/ -count=1 -v

# Cost calculation tests
go test ./framework/modelcatalog/ -count=1 -v

# Full build
make build LOCAL=1
```

Manual verification:

1. Send a bare model like `gpt-4o-realtime-preview-2025-06-03` to `/v1/realtime`
   — verify routing engine logs show model catalog resolution in the Logs UI
2. Use a virtual key — verify virtual key info appears in the log entry
3. Have the model make a tool call alongside a text response — verify both
   appear in the log output
4. Check the cost column shows non-zero values for realtime turns
5. Verify tool definitions from `session.update` appear in the log's "Tools"
   field

## Screenshots/Recordings

N/A

## Breaking changes

- [ ] Yes
- [x] No

## Related issues

N/A

## Security considerations

`ComputeRawStorageForProvider` is a read-only method that checks provider
config. No new auth surfaces or secret handling.

## Checklist

- [x] I read `docs/contributing/README.md` and followed the guidelines
- [x] I added/updated tests where appropriate
- [x] I updated documentation where needed
- [x] I verified builds succeed (Go and UI)
- [x] I verified the CI pipeline passes locally if applicable
akshaydeo pushed a commit that referenced this pull request May 15, 2026
…3335)

## Summary

Closes multiple gaps in realtime observability so that realtime turns have the
same logging richness as normal LLM calls: routing engine logs, tool
definitions, voice/transport metadata, cost calculation, and proper context
propagation through the turn lifecycle.

## Changes

- **Governance routing for realtime** (`plugins/governance/main.go`): Added
  `governRealtimeQueryParam` so realtime WebSocket requests participate in
  routing rules and virtual key governance via query param model resolution
- **WebSocket middleware context propagation** (`handlers/wsrealtime.go`): Added
  `snapshotRealtimeMiddlewareValues` / `applyRealtimeMiddlewareValues` to
  capture governance context values from the HTTP middleware and propagate them
  to the WebSocket session context. Processes model catalog resolution to
  generate routing engine log entries. Computes raw storage flag via
  `ComputeRawStorageForProvider`
- **WebRTC middleware context propagation** (`handlers/webrtc_realtime.go`):
  Same propagation for WebRTC relay. Added nested model prefix stripping for
  legacy `/v1/realtime` POST path. Added model catalog auto-resolution for bare
  models
- **Client secrets operational logging**
  (`handlers/realtime_client_secrets.go`): Added model catalog auto-resolution
  and operational logs (Info for requests/success, Error for failures)
- **Session tool and voice tracking** (`websocket/session.go`): Added
  `realtimeSessionTools` and `realtimeVoice` fields with getters/setters.
  Replaced `strings.Contains` dedup with replace-with-latest strategy for tool
  output events. Added close guards on mutating methods. `Close()` now nils all
  accumulated data
- **Turn pipeline enrichment** (`handlers/realtime_turn_pipeline.go`): Added
  `updateRealtimeSessionFromEvent` to track tools, voice, and strip nested model
  prefixes from session events. Updated `buildRealtimeTurnPreRequest` to attach
  session tools. Added `restoreRealtimeTurnTraceContext` and
  `applyRealtimeRawStorageContext` for context propagation. Rewrote
  `buildRealtimeTurnOutputMessages` to merge provider extractor output with raw
  `response.done` payload so both text and tool calls appear
- **Logging plugin fixes** (`plugins/logging/main.go`): Added nil check for
  `ResponsesRequest.Params` before iterating tools (fixed panic). Moved
  realtime-specific PostLLMHook enrichment to run after `routingEngineLogs`
  extraction so routing engine decision logs are populated
- **Voice/transport metadata** (`plugins/logging/utils.go`):
  `mergeRealtimeMetadata` now writes `realtime_voice` and `realtime_transport`
- **Cost calculation** (`framework/modelcatalog/pricing.go`): Added
  `RealtimeRequest` to `calculateBaseCost`. `computeTextCost` now subtracts
  audio tokens from text counts and prices them at
  `InputCostPerAudioToken`/`OutputCostPerAudioToken` rates. Added `AudioTokens`
  mapping for output token details
- **Core exports** (`core/bifrost.go`, `core/schemas/bifrost.go`): Added
  `ComputeRawStorageForProvider` method and
  `BifrostContextKeyRealtimeVoice`/`BifrostContextKeyRealtimeTransport` context
  keys
- **Tests**: Added dedup behavior tests, output message merging tests, updated
  existing test expectations

## Type of change

- [x] Bug fix
- [x] Feature
- [ ] Refactor
- [ ] Documentation
- [ ] Chore/CI

## Affected areas

- [x] Core (Go)
- [x] Transports (HTTP)
- [ ] Providers/Integrations
- [x] Plugins
- [ ] UI (React)
- [ ] Docs

## How to test

```sh
# Handler tests (covers turn pipeline, dedup, output merging)
go test ./transports/bifrost-http/handlers/ -count=1 -v

# Logging plugin tests
go test ./plugins/logging/ -count=1 -v

# Cost calculation tests
go test ./framework/modelcatalog/ -count=1 -v

# Full build
make build LOCAL=1
```

Manual verification:

1. Send a bare model like `gpt-4o-realtime-preview-2025-06-03` to `/v1/realtime`
   — verify routing engine logs show model catalog resolution in the Logs UI
2. Use a virtual key — verify virtual key info appears in the log entry
3. Have the model make a tool call alongside a text response — verify both
   appear in the log output
4. Check the cost column shows non-zero values for realtime turns
5. Verify tool definitions from `session.update` appear in the log's "Tools"
   field

## Screenshots/Recordings

N/A

## Breaking changes

- [ ] Yes
- [x] No

## Related issues

N/A

## Security considerations

`ComputeRawStorageForProvider` is a read-only method that checks provider
config. No new auth surfaces or secret handling.

## Checklist

- [x] I read `docs/contributing/README.md` and followed the guidelines
- [x] I added/updated tests where appropriate
- [x] I updated documentation where needed
- [x] I verified builds succeed (Go and UI)
- [x] I verified the CI pipeline passes locally if applicable
akshaydeo pushed a commit that referenced this pull request May 20, 2026
…3335)

## Summary

Closes multiple gaps in realtime observability so that realtime turns have the
same logging richness as normal LLM calls: routing engine logs, tool
definitions, voice/transport metadata, cost calculation, and proper context
propagation through the turn lifecycle.

## Changes

- **Governance routing for realtime** (`plugins/governance/main.go`): Added
  `governRealtimeQueryParam` so realtime WebSocket requests participate in
  routing rules and virtual key governance via query param model resolution
- **WebSocket middleware context propagation** (`handlers/wsrealtime.go`): Added
  `snapshotRealtimeMiddlewareValues` / `applyRealtimeMiddlewareValues` to
  capture governance context values from the HTTP middleware and propagate them
  to the WebSocket session context. Processes model catalog resolution to
  generate routing engine log entries. Computes raw storage flag via
  `ComputeRawStorageForProvider`
- **WebRTC middleware context propagation** (`handlers/webrtc_realtime.go`):
  Same propagation for WebRTC relay. Added nested model prefix stripping for
  legacy `/v1/realtime` POST path. Added model catalog auto-resolution for bare
  models
- **Client secrets operational logging**
  (`handlers/realtime_client_secrets.go`): Added model catalog auto-resolution
  and operational logs (Info for requests/success, Error for failures)
- **Session tool and voice tracking** (`websocket/session.go`): Added
  `realtimeSessionTools` and `realtimeVoice` fields with getters/setters.
  Replaced `strings.Contains` dedup with replace-with-latest strategy for tool
  output events. Added close guards on mutating methods. `Close()` now nils all
  accumulated data
- **Turn pipeline enrichment** (`handlers/realtime_turn_pipeline.go`): Added
  `updateRealtimeSessionFromEvent` to track tools, voice, and strip nested model
  prefixes from session events. Updated `buildRealtimeTurnPreRequest` to attach
  session tools. Added `restoreRealtimeTurnTraceContext` and
  `applyRealtimeRawStorageContext` for context propagation. Rewrote
  `buildRealtimeTurnOutputMessages` to merge provider extractor output with raw
  `response.done` payload so both text and tool calls appear
- **Logging plugin fixes** (`plugins/logging/main.go`): Added nil check for
  `ResponsesRequest.Params` before iterating tools (fixed panic). Moved
  realtime-specific PostLLMHook enrichment to run after `routingEngineLogs`
  extraction so routing engine decision logs are populated
- **Voice/transport metadata** (`plugins/logging/utils.go`):
  `mergeRealtimeMetadata` now writes `realtime_voice` and `realtime_transport`
- **Cost calculation** (`framework/modelcatalog/pricing.go`): Added
  `RealtimeRequest` to `calculateBaseCost`. `computeTextCost` now subtracts
  audio tokens from text counts and prices them at
  `InputCostPerAudioToken`/`OutputCostPerAudioToken` rates. Added `AudioTokens`
  mapping for output token details
- **Core exports** (`core/bifrost.go`, `core/schemas/bifrost.go`): Added
  `ComputeRawStorageForProvider` method and
  `BifrostContextKeyRealtimeVoice`/`BifrostContextKeyRealtimeTransport` context
  keys
- **Tests**: Added dedup behavior tests, output message merging tests, updated
  existing test expectations

## Type of change

- [x] Bug fix
- [x] Feature
- [ ] Refactor
- [ ] Documentation
- [ ] Chore/CI

## Affected areas

- [x] Core (Go)
- [x] Transports (HTTP)
- [ ] Providers/Integrations
- [x] Plugins
- [ ] UI (React)
- [ ] Docs

## How to test

```sh
# Handler tests (covers turn pipeline, dedup, output merging)
go test ./transports/bifrost-http/handlers/ -count=1 -v

# Logging plugin tests
go test ./plugins/logging/ -count=1 -v

# Cost calculation tests
go test ./framework/modelcatalog/ -count=1 -v

# Full build
make build LOCAL=1
```

Manual verification:

1. Send a bare model like `gpt-4o-realtime-preview-2025-06-03` to `/v1/realtime`
   — verify routing engine logs show model catalog resolution in the Logs UI
2. Use a virtual key — verify virtual key info appears in the log entry
3. Have the model make a tool call alongside a text response — verify both
   appear in the log output
4. Check the cost column shows non-zero values for realtime turns
5. Verify tool definitions from `session.update` appear in the log's "Tools"
   field

## Screenshots/Recordings

N/A

## Breaking changes

- [ ] Yes
- [x] No

## Related issues

N/A

## Security considerations

`ComputeRawStorageForProvider` is a read-only method that checks provider
config. No new auth surfaces or secret handling.

## Checklist

- [x] I read `docs/contributing/README.md` and followed the guidelines
- [x] I added/updated tests where appropriate
- [x] I updated documentation where needed
- [x] I verified builds succeed (Go and UI)
- [x] I verified the CI pipeline passes locally if applicable
@akshaydeo akshaydeo mentioned this pull request May 20, 2026
18 tasks
akshaydeo added a commit that referenced this pull request May 20, 2026
## Summary

This PR cuts the `v1.5.11` / `v1.3.11` release across core, framework, and all plugins, and introduces a new Claude skill (`release-checklist`) for pre-release migration safety auditing.

## Changes

- **`release-checklist` skill** — Adds `.claude/skills/release-checklist/SKILL.md`, a read-only pre-release audit tool that scans Go-defined database migrations changed in a release for high-scale deadlock/lock-contention risks and boot-time-blocking operations. It produces a structured `PASS`/`WARN`/`FAIL` report with a concrete remediation plan per finding. The skill is designed to grow via an extensible Checks Registry.
- **Version bumps** — `core` → `1.5.11`, `framework` → `1.3.11`, `transports` → `1.5.3`, `plugins/governance` → `1.5.11`, `plugins/logging` → `1.5.11`, `plugins/semanticcache` → `1.5.11`, `plugins/otel` → `1.2.11`, `plugins/maxim` → `1.6.11`, `plugins/prompts` → `1.0.11`, and remaining plugins bumped accordingly.
- **Changelogs populated** — All per-package changelogs updated with the full set of features and fixes shipping in this release.

Key highlights in this release:
- Temporary access tokens for scoped, time-limited API access
- MCP per-user OAuth flow refactor
- Bedrock Mantle inference engine support
- Azure Realtime provider with enriched session tracking
- Direct access control (DAC) and virtual key rotation
- Cluster-aware log metadata and per-node usage aggregation
- Feature flag framework
- Config-hash-based file value override of DB on restart
- Semantic cache plugin rewrite
- Numerous streaming stability, Bedrock, Anthropic, and Gemini fixes
- AWS SDK and dependency security updates

## Type of change

- [ ] Bug fix
- [ ] Feature
- [ ] Refactor
- [ ] Documentation
- [x] Chore/CI

## Affected areas

- [x] Core (Go)
- [x] Transports (HTTP)
- [x] Providers/Integrations
- [x] Plugins
- [x] UI (React)
- [ ] Docs

## How to test

```sh
# Verify version files reflect the new release
cat core/version          # expect 1.5.11
cat framework/version     # expect 1.3.11
cat transports/version    # expect 1.5.3

# Core/Transports
go test ./...
```

To exercise the new `release-checklist` skill, invoke it via Claude with:
```
/release-checklist origin/dev...HEAD
```
Expected output: a structured report with `PASS`/`WARN`/`FAIL` per check and a Remediation Plan table for any findings.

## Screenshots/Recordings

N/A

## Breaking changes

- [ ] Yes
- [x] No

## Related issues

#3603, #3565, #3489, #3334, #3335, #3435, #3554, #3590, #3444, #3198, #3581, #3610, #3599, #3567, #3382, #3461 and others listed in the changelogs.

## Security considerations

- AWS SDK and dependency security updates are included (#3461).
- `FullyRedacted()` for proxy passwords and `MarshalForStorage()` for `ProxyConfig` prevent partial secret leakage in API responses (#3445).
- The `release-checklist` skill is strictly read-only and never modifies files.

## Checklist

- [x] I read `docs/contributing/README.md` and followed the guidelines
- [x] I added/updated tests where appropriate
- [x] I updated documentation where needed
- [x] I verified builds succeed (Go and UI)
- [ ] I verified the CI pipeline passes locally if applicable
@akshaydeo akshaydeo mentioned this pull request May 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants