Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .github/workflows/scripts/run-migration-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1400,6 +1400,29 @@ append_dynamic_columns_postgres() {
echo "UPDATE mcp_tool_logs SET request_id = '' WHERE id = 'mcp-log-migration-001';" >> "$output_file"
echo "UPDATE mcp_tool_logs SET request_id = '' WHERE id = 'mcp-log-migration-002';" >> "$output_file"
fi

# -------------------------------------------------------------------------
# v1.4.22 columns - flex tier pricing and litellm fallbacks toggle
# -------------------------------------------------------------------------

# config_client.enable_litellm_fallbacks (added in v1.4.22)
if column_exists_postgres "config_client" "enable_litellm_fallbacks"; then
echo "UPDATE config_client SET enable_litellm_fallbacks = false WHERE id = 1;" >> "$output_file"
fi

# governance_model_pricing flex tier columns (added in v1.4.22)
if column_exists_postgres "governance_model_pricing" "input_cost_per_token_flex"; then
echo "UPDATE governance_model_pricing SET input_cost_per_token_flex = NULL WHERE id = 1;" >> "$output_file"
echo "UPDATE governance_model_pricing SET input_cost_per_token_flex = NULL WHERE id = 2;" >> "$output_file"
fi
if column_exists_postgres "governance_model_pricing" "output_cost_per_token_flex"; then
echo "UPDATE governance_model_pricing SET output_cost_per_token_flex = NULL WHERE id = 1;" >> "$output_file"
echo "UPDATE governance_model_pricing SET output_cost_per_token_flex = NULL WHERE id = 2;" >> "$output_file"
fi
if column_exists_postgres "governance_model_pricing" "cache_read_input_token_cost_flex"; then
echo "UPDATE governance_model_pricing SET cache_read_input_token_cost_flex = NULL WHERE id = 1;" >> "$output_file"
echo "UPDATE governance_model_pricing SET cache_read_input_token_cost_flex = NULL WHERE id = 2;" >> "$output_file"
fi
}

# Append dynamic column UPDATEs for columns that may not exist in older schemas (SQLite)
Expand Down Expand Up @@ -2030,6 +2053,31 @@ append_dynamic_columns_sqlite() {
# mcp_tool_logs.request_id (added in v1.4.21)
echo "UPDATE mcp_tool_logs SET request_id = '' WHERE id = 'mcp-log-migration-001';" >> "$output_file"
echo "UPDATE mcp_tool_logs SET request_id = '' WHERE id = 'mcp-log-migration-002';" >> "$output_file"

# -------------------------------------------------------------------------
# v1.4.22 columns - flex tier pricing and litellm fallbacks toggle
# -------------------------------------------------------------------------

if [ -f "$config_db" ]; then
# config_client.enable_litellm_fallbacks (added in v1.4.22)
if column_exists_sqlite "$config_db" "config_client" "enable_litellm_fallbacks"; then
echo "UPDATE config_client SET enable_litellm_fallbacks = 0 WHERE id = 1;" >> "$output_file"
fi

# governance_model_pricing flex tier columns (added in v1.4.22)
if column_exists_sqlite "$config_db" "governance_model_pricing" "input_cost_per_token_flex"; then
echo "UPDATE governance_model_pricing SET input_cost_per_token_flex = NULL WHERE id = 1;" >> "$output_file"
echo "UPDATE governance_model_pricing SET input_cost_per_token_flex = NULL WHERE id = 2;" >> "$output_file"
fi
if column_exists_sqlite "$config_db" "governance_model_pricing" "output_cost_per_token_flex"; then
echo "UPDATE governance_model_pricing SET output_cost_per_token_flex = NULL WHERE id = 1;" >> "$output_file"
echo "UPDATE governance_model_pricing SET output_cost_per_token_flex = NULL WHERE id = 2;" >> "$output_file"
fi
if column_exists_sqlite "$config_db" "governance_model_pricing" "cache_read_input_token_cost_flex"; then
echo "UPDATE governance_model_pricing SET cache_read_input_token_cost_flex = NULL WHERE id = 1;" >> "$output_file"
echo "UPDATE governance_model_pricing SET cache_read_input_token_cost_flex = NULL WHERE id = 2;" >> "$output_file"
fi
fi
}

# ============================================================================
Expand Down Expand Up @@ -2933,6 +2981,10 @@ compare_postgres_snapshots() {
if [ "$table" = "governance_budgets" ]; then
dropped_columns="$dropped_columns calendar_aligned"
fi
# enable_litellm_fallbacks (dropped from config_client in latest cut - behavior moved elsewhere)
if [ "$table" = "config_client" ]; then
dropped_columns="$dropped_columns enable_litellm_fallbacks"
fi

local before_col_array
IFS=',' read -ra before_col_array <<< "$before_columns"
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,7 @@ terraform.tfstate.backup
bifrost-benchmarking

# Tests
:memory:
:memory:

# Generated test TLS certs (created by tests/docker-compose.yml redis-certs-init)
tests/redis-certs/
4 changes: 4 additions & 0 deletions core/changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- refactor: split ModelRequested into OriginalModelRequested and ResolvedModelUsed for model alias tracking
- refactor: simplify Azure passthrough by removing redundant config nil checks
- refactor: simplify Mistral error parsing signature
- fix: carry ProviderResponseHeaders through text completion response conversion
2 changes: 1 addition & 1 deletion core/schemas/bifrost.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ const (
BifrostContextKeyStreamStartTime BifrostContextKey = "bifrost-stream-start-time" // time.Time (start time for streaming TTFT calculation - set by bifrost)
BifrostContextKeyTracer BifrostContextKey = "bifrost-tracer" // Tracer (tracer instance for completing deferred spans - set by bifrost)
BifrostContextKeyDeferTraceCompletion BifrostContextKey = "bifrost-defer-trace-completion" // bool (signals trace completion should be deferred for streaming - set by streaming handlers)
BifrostContextKeyTraceCompleter BifrostContextKey = "bifrost-trace-completer" // func() (callback to complete trace after streaming - set by tracing middleware)
BifrostContextKeyTraceCompleter BifrostContextKey = "bifrost-trace-completer" // func([]PluginLogEntry) (callback to complete trace after streaming, receives transport plugin logs - set by tracing middleware)
BifrostContextKeyPostHookSpanFinalizer BifrostContextKey = "bifrost-posthook-span-finalizer" // func(context.Context) (callback to finalize post-hook spans after streaming - set by bifrost)
BifrostContextKeyAccumulatorID BifrostContextKey = "bifrost-accumulator-id" // string (ID for streaming accumulator lookup - set by tracer for accumulator operations)
BifrostContextKeyMCPUserSession BifrostContextKey = "bifrost-mcp-user-session" // string (per-user OAuth session token, automatically generated by bifrost)
Expand Down
2 changes: 1 addition & 1 deletion core/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.5.1
1.5.2
4 changes: 4 additions & 0 deletions framework/changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- feat: add MCP client discovered tools and tool name mapping migration
- fix: exception handling in async log store jobs
- refactor: model catalog Init API to use SetShouldSyncGate method
- refactor: rename DefaultPricingSyncInterval to DefaultSyncInterval
Comment thread
akshaydeo marked this conversation as resolved.
Loading
Loading