-
Notifications
You must be signed in to change notification settings - Fork 60
feat: add virtual key provider config table with weighted routing #546
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add virtual key provider config table with weighted routing #546
Conversation
Warning Rate limit exceeded@akshaydeo has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 3 minutes and 56 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (35)
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. 📝 WalkthroughSummary by CodeRabbit
WalkthroughAdds provider-config support for virtual keys (DB table, store CRUD, migrations), switches governance checks to provider-first, adds VK-based provider routing middleware, extends pricing with model-provider pools, updates HTTP handlers and UI for provider-configs, and includes assorted formatting and minor logging tweaks. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant C as Client
participant S as HTTP Server
participant MW as VKProviderRoutingMiddleware
participant CS as ConfigStore
participant H as Handler
C->>S: POST /completions (x-bf-vk, body:{model})
S->>MW: Invoke middleware
alt no header / model absent / model already prefixed
MW-->>S: pass-through
else
MW->>CS: GetVirtualKeyByValue(x-bf-vk)
CS-->>MW: VirtualKey + ProviderConfigs
MW->>MW: filter ProviderConfigs by model
MW->>MW: weighted random select provider
MW->>S: rewrite body.model to "provider/model"
end
S->>H: call next handler with possibly rewritten body
H-->>C: response
sequenceDiagram
autonumber
participant R as BudgetResolver
participant VK as VirtualKey (ProviderConfigs)
R->>VK: isProviderAllowed(provider)
alt ProviderConfigs empty
R-->>R: provider allowed
else provider present?
R-->>R: allow or provider_blocked
end
R->>VK: isModelAllowed(provider, model)
alt provider config AllowedModels empty
R-->>R: model allowed
else model in AllowedModels?
R-->>R: allow or model_blocked
end
sequenceDiagram
autonumber
participant PM as PricingManager
participant Src as Pricing Data
PM->>Src: load pricing
PM->>PM: populateModelPool()
PM-->>PM: modelPool{provider:[models]}
Note over PM: exposes GetModelsForProvider / GetProvidersForModel
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60–90 minutes Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
Comment |
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
254cb83
to
73aadec
Compare
c7b303f
to
e53188c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 6
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
ui/app/teams-customers/views/customerTable.tsx (1)
106-106
: Fix the colSpan value to match the column count.The table now has 6 columns (Name, Teams, Budget, Reset Period, Virtual Keys, Actions), but the empty state colSpan is set to 5. This will cause misalignment.
Apply this diff:
-<TableCell colSpan={5} className="text-muted-foreground py-8 text-center"> +<TableCell colSpan={6} className="text-muted-foreground py-8 text-center">
🧹 Nitpick comments (1)
ui/hooks/useDebounce.ts (1)
5-5
: Use generic type parameter for better type safety.The function signature uses
any
for both the value parameter and return type, which loses type information. Consider using a generic type parameter to preserve the input type.Apply this diff to improve type safety:
-export function useDebouncedValue(value: any, delay: number): any { +export function useDebouncedValue<T>(value: T, delay: number): T {
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (36)
core/bifrost.go
(1 hunks)core/providers/bedrock.go
(1 hunks)core/schemas/bifrost.go
(5 hunks)framework/configstore/migrations.go
(2 hunks)framework/configstore/sqlite.go
(5 hunks)framework/configstore/store.go
(1 hunks)framework/configstore/tables.go
(3 hunks)framework/logstore/tables.go
(1 hunks)framework/pricing/main.go
(5 hunks)framework/pricing/sync.go
(1 hunks)plugins/governance/resolver.go
(2 hunks)plugins/governance/tracker.go
(0 hunks)plugins/maxim/main.go
(1 hunks)plugins/otel/converter.go
(1 hunks)plugins/semanticcache/test_utils.go
(1 hunks)transports/bifrost-http/handlers/completions.go
(1 hunks)transports/bifrost-http/handlers/governance.go
(5 hunks)transports/bifrost-http/handlers/middlewares.go
(2 hunks)transports/bifrost-http/handlers/server.go
(5 hunks)transports/bifrost-http/integrations/anthropic/types.go
(1 hunks)transports/bifrost-http/integrations/openai/types.go
(2 hunks)transports/bifrost-http/lib/config.go
(4 hunks)ui/app/providers/fragments/apiKeysFormFragment.tsx
(1 hunks)ui/app/teams-customers/views/customerTable.tsx
(3 hunks)ui/app/teams-customers/views/teamDialog.tsx
(3 hunks)ui/app/virtual-keys/views/virtualKeyDetailsDialog.tsx
(3 hunks)ui/app/virtual-keys/views/virtualKeyDialog.tsx
(5 hunks)ui/app/virtual-keys/views/virtualKeysTable.tsx
(1 hunks)ui/components/ui/dialog.tsx
(3 hunks)ui/components/ui/multiSelect.tsx
(1 hunks)ui/components/ui/numberAndSelect.tsx
(2 hunks)ui/components/ui/tagInput.tsx
(1 hunks)ui/hooks/useDebounce.ts
(1 hunks)ui/lib/constants/config.ts
(1 hunks)ui/lib/constants/logs.ts
(1 hunks)ui/lib/types/governance.ts
(4 hunks)
💤 Files with no reviewable changes (1)
- plugins/governance/tracker.go
🧰 Additional context used
🧬 Code graph analysis (24)
plugins/semanticcache/test_utils.go (1)
core/schemas/bifrost.go (1)
OpenAI
(41-41)
transports/bifrost-http/integrations/openai/types.go (2)
core/schemas/bifrost.go (1)
Tool
(332-336)ui/lib/types/logs.ts (1)
Tool
(136-140)
framework/configstore/migrations.go (2)
framework/configstore/internal/migration/migrator.go (3)
New
(131-149)DefaultOptions
(100-106)Migration
(62-69)framework/configstore/tables.go (2)
TableVirtualKeyProviderConfig
(644-650)TableVirtualKeyProviderConfig
(691-693)
framework/logstore/tables.go (2)
core/schemas/bifrost.go (4)
BifrostEmbedding
(635-639)ModelParameters
(296-313)Tool
(332-336)ToolCall
(613-617)ui/lib/types/logs.ts (4)
BifrostEmbedding
(115-119)ModelParameters
(154-166)Tool
(136-140)ToolCall
(147-151)
core/bifrost.go (1)
core/schemas/account.go (1)
Key
(8-16)
ui/app/virtual-keys/views/virtualKeyDetailsDialog.tsx (2)
ui/lib/constants/icons.tsx (2)
RenderProviderIcon
(564-568)ProviderIconType
(570-570)ui/lib/constants/logs.ts (2)
ProviderLabels
(38-53)ProviderName
(20-20)
transports/bifrost-http/handlers/server.go (2)
transports/bifrost-http/handlers/middlewares.go (1)
VKProviderRoutingMiddleware
(49-195)transports/bifrost-http/lib/config.go (1)
Config
(115-142)
plugins/otel/converter.go (3)
core/providers/gemini.go (1)
Content
(40-48)core/schemas/bifrost.go (2)
ModelChatMessageRoleAssistant
(30-30)ModelChatMessageRoleSystem
(32-32)plugins/otel/types.go (1)
KeyValue
(21-21)
transports/bifrost-http/handlers/middlewares.go (6)
transports/bifrost-http/lib/config.go (1)
Config
(115-142)core/schemas/logger.go (1)
Logger
(28-55)framework/configstore/store.go (1)
ConfigStore
(15-111)transports/bifrost-http/handlers/utils.go (1)
SendError
(27-36)framework/configstore/tables.go (2)
TableVirtualKeyProviderConfig
(644-650)TableVirtualKeyProviderConfig
(691-693)core/schemas/bifrost.go (1)
ModelProvider
(38-38)
plugins/governance/resolver.go (3)
ui/lib/types/governance.ts (1)
VirtualKey
(50-69)framework/configstore/tables.go (2)
TableVirtualKey
(618-641)TableVirtualKey
(690-690)core/schemas/bifrost.go (1)
ModelProvider
(38-38)
transports/bifrost-http/handlers/completions.go (2)
core/schemas/bifrost.go (1)
Tool
(332-336)ui/lib/types/logs.ts (1)
Tool
(136-140)
framework/configstore/sqlite.go (1)
framework/configstore/tables.go (4)
TableVirtualKey
(618-641)TableVirtualKey
(690-690)TableVirtualKeyProviderConfig
(644-650)TableVirtualKeyProviderConfig
(691-693)
framework/configstore/store.go (1)
framework/configstore/tables.go (4)
TableVirtualKey
(618-641)TableVirtualKey
(690-690)TableVirtualKeyProviderConfig
(644-650)TableVirtualKeyProviderConfig
(691-693)
framework/pricing/main.go (1)
core/schemas/bifrost.go (1)
ModelProvider
(38-38)
transports/bifrost-http/handlers/governance.go (1)
framework/configstore/tables.go (2)
TableVirtualKeyProviderConfig
(644-650)TableVirtualKeyProviderConfig
(691-693)
ui/components/ui/numberAndSelect.tsx (1)
ui/components/ui/input.tsx (1)
Input
(13-67)
ui/components/ui/tagInput.tsx (2)
ui/lib/utils.ts (1)
cn
(4-6)ui/components/ui/input.tsx (1)
Input
(13-67)
ui/app/virtual-keys/views/virtualKeyDialog.tsx (6)
ui/lib/types/governance.ts (2)
VirtualKeyProviderConfig
(71-76)UpdateVirtualKeyRequest
(101-110)ui/components/ui/multiSelect.tsx (1)
MultiSelect
(286-1049)ui/lib/constants/logs.ts (3)
ProviderNames
(22-22)ProviderLabels
(38-53)ProviderName
(20-20)ui/lib/constants/icons.tsx (2)
RenderProviderIcon
(564-568)ProviderIconType
(570-570)ui/components/ui/tagInput.tsx (1)
TagInput
(16-74)ui/lib/constants/config.ts (1)
MODEL_PLACEHOLDERS
(5-21)
core/schemas/bifrost.go (1)
ui/lib/types/logs.ts (3)
BifrostMessage
(105-113)Tool
(136-140)ToolCall
(147-151)
ui/app/teams-customers/views/teamDialog.tsx (1)
ui/lib/utils/governance.ts (1)
formatCurrency
(27-29)
transports/bifrost-http/lib/config.go (1)
framework/configstore/store.go (1)
ConfigStore
(15-111)
ui/lib/constants/config.ts (1)
ui/lib/constants/logs.ts (1)
ProviderName
(20-20)
ui/app/teams-customers/views/customerTable.tsx (2)
ui/lib/utils.ts (1)
cn
(4-6)ui/lib/utils/governance.ts (2)
formatCurrency
(27-29)parseResetPeriod
(4-25)
ui/components/ui/dialog.tsx (1)
ui/lib/utils.ts (1)
cn
(4-6)
⏰ Context from checks skipped due to timeout of 900000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Graphite / mergeability_check
- GitHub Check: Graphite / mergeability_check
🔇 Additional comments (16)
plugins/maxim/main.go (1)
395-401
: Whitespace normalization looks good.
No functional changes introduced; the formatting tweak is fine.framework/logstore/tables.go (1)
105-108
: No functional impact here.Alignment-only tweaks; existing JSON field parsing remains intact.
transports/bifrost-http/integrations/openai/types.go (2)
22-22
: Field alignment looks good. Schema reuse unchanged; no functional impact.
143-145
: Formatting tweak acknowledged. Pointer semantics preserved; streaming delta behavior unaffected.ui/components/ui/numberAndSelect.tsx (1)
14-14
: LGTM! Clean styling enhancement.The optional
labelClassName
prop is properly typed and consistently applied to both Label components, providing useful styling flexibility without breaking existing usage.Also applies to: 23-23, 28-30, 34-36
plugins/otel/converter.go (1)
132-132
: LGTM! Formatting-only changes.The whitespace adjustments in the message role handling logic maintain code hygiene without altering behavior.
Also applies to: 138-138, 141-141
ui/components/ui/multiSelect.tsx (1)
813-813
: Confirm hover feedback removal is intentional.The removal of
hover:bg-white/20
andp-0.5
makes the remove button more minimalist but eliminates visual hover feedback. This could reduce discoverability for users who rely on hover states to identify interactive elements.Verify that:
- This styling change aligns with the design system used elsewhere in the PR (e.g., provider config UI components)
- The reduced visual feedback doesn't negatively impact UX, especially for users who depend on hover cues
- The focus state (
focus:outline-none
) provides sufficient alternative feedback for keyboard navigationConsider re-adding a subtle hover effect (e.g.,
hover:opacity-70
) if user testing indicates discoverability issues.ui/app/teams-customers/views/customerTable.tsx (3)
21-21
: LGTM: Import adjustments align with refactored UI.The removal of
DollarSign
and addition ofcn
utility correctly support the updated budget display logic that now uses conditional styling instead of icon-based indicators.Also applies to: 25-25
98-98
: LGTM: New column header improves data organization.The separate "Reset Period" column header provides clearer information architecture by splitting previously combined budget/reset-period data.
140-158
: LGTM: Budget display refactor improves clarity and maintainability.The changes successfully:
- Use
cn
for conditional styling when usage exceeds limit- Apply proper formatting via
formatCurrency
for both usage and limit- Separate reset period into its own cell with
parseResetPeriod
- Maintain consistent fallback behavior with dashes for missing data
ui/app/teams-customers/views/teamDialog.tsx (1)
17-17
: LGTM: Building icon enhances customer visual hierarchy.The addition of the
Building
icon provides a consistent visual indicator for customer assignments, aligning with the pattern of using icons (Users, Key) to denote different entity types throughout the governance UI.Also applies to: 188-188
core/bifrost.go (1)
1579-1579
: LGTM! Improved error context.The enhanced error message now includes both provider and model information, making debugging easier when keys are unavailable for a specific provider-model combination.
ui/app/providers/fragments/apiKeysFormFragment.tsx (1)
10-10
: LGTM! Good refactoring to centralize constants.Moving MODEL_PLACEHOLDERS to a centralized config module improves maintainability and reduces duplication.
transports/bifrost-http/lib/config.go (1)
138-138
: LGTM! Useful addition for plugin tracking.The LoadedPlugins field provides a clear way to track which plugins are active, supporting the plugin management features introduced in this PR.
ui/lib/constants/config.ts (1)
5-38
: LGTM! Useful centralized provider configuration.The new MODEL_PLACEHOLDERS and isKeyRequiredByProvider constants provide centralized provider-specific configuration that improves UI consistency and maintainability.
ui/lib/types/governance.ts (1)
55-76
: Missing migration for provider_configs table
I didn’t find any DB migration to create or migrate data into the new provider_configs structure. Ensure you add a migration script that transitions existing virtual keys from allowed_models/allowed_providers to provider_configs.
4eb7256
to
f2bca7e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (37)
Makefile
(1 hunks)core/bifrost.go
(1 hunks)core/providers/bedrock.go
(1 hunks)core/schemas/bifrost.go
(5 hunks)framework/configstore/migrations.go
(2 hunks)framework/configstore/sqlite.go
(5 hunks)framework/configstore/store.go
(1 hunks)framework/configstore/tables.go
(3 hunks)framework/logstore/tables.go
(1 hunks)framework/pricing/main.go
(5 hunks)framework/pricing/sync.go
(1 hunks)plugins/governance/resolver.go
(2 hunks)plugins/governance/tracker.go
(0 hunks)plugins/maxim/main.go
(1 hunks)plugins/otel/converter.go
(1 hunks)plugins/semanticcache/test_utils.go
(1 hunks)transports/bifrost-http/handlers/completions.go
(1 hunks)transports/bifrost-http/handlers/governance.go
(5 hunks)transports/bifrost-http/handlers/middlewares.go
(2 hunks)transports/bifrost-http/handlers/server.go
(5 hunks)transports/bifrost-http/integrations/anthropic/types.go
(1 hunks)transports/bifrost-http/integrations/openai/types.go
(2 hunks)transports/bifrost-http/lib/config.go
(4 hunks)ui/app/providers/fragments/apiKeysFormFragment.tsx
(1 hunks)ui/app/teams-customers/views/customerTable.tsx
(3 hunks)ui/app/teams-customers/views/teamDialog.tsx
(3 hunks)ui/app/virtual-keys/views/virtualKeyDetailsDialog.tsx
(3 hunks)ui/app/virtual-keys/views/virtualKeyDialog.tsx
(5 hunks)ui/app/virtual-keys/views/virtualKeysTable.tsx
(1 hunks)ui/components/ui/dialog.tsx
(3 hunks)ui/components/ui/multiSelect.tsx
(1 hunks)ui/components/ui/numberAndSelect.tsx
(3 hunks)ui/components/ui/tagInput.tsx
(1 hunks)ui/hooks/useDebounce.ts
(1 hunks)ui/lib/constants/config.ts
(1 hunks)ui/lib/constants/logs.ts
(1 hunks)ui/lib/types/governance.ts
(4 hunks)
💤 Files with no reviewable changes (1)
- plugins/governance/tracker.go
✅ Files skipped from review due to trivial changes (2)
- plugins/semanticcache/test_utils.go
- transports/bifrost-http/integrations/anthropic/types.go
🚧 Files skipped from review as they are similar to previous changes (18)
- ui/components/ui/numberAndSelect.tsx
- ui/app/teams-customers/views/customerTable.tsx
- framework/logstore/tables.go
- core/schemas/bifrost.go
- ui/app/virtual-keys/views/virtualKeysTable.tsx
- ui/app/providers/fragments/apiKeysFormFragment.tsx
- core/bifrost.go
- transports/bifrost-http/lib/config.go
- transports/bifrost-http/integrations/openai/types.go
- transports/bifrost-http/handlers/completions.go
- ui/components/ui/tagInput.tsx
- core/providers/bedrock.go
- ui/components/ui/dialog.tsx
- plugins/otel/converter.go
- ui/lib/types/governance.ts
- plugins/maxim/main.go
- ui/hooks/useDebounce.ts
- ui/components/ui/multiSelect.tsx
🧰 Additional context used
🧬 Code graph analysis (12)
transports/bifrost-http/handlers/middlewares.go (6)
transports/bifrost-http/lib/config.go (1)
Config
(115-142)core/schemas/logger.go (1)
Logger
(28-55)framework/configstore/store.go (1)
ConfigStore
(15-111)transports/bifrost-http/handlers/utils.go (1)
SendError
(27-36)framework/configstore/tables.go (2)
TableVirtualKeyProviderConfig
(644-650)TableVirtualKeyProviderConfig
(691-693)core/schemas/bifrost.go (1)
ModelProvider
(38-38)
ui/app/virtual-keys/views/virtualKeyDetailsDialog.tsx (2)
ui/lib/constants/icons.tsx (2)
RenderProviderIcon
(564-568)ProviderIconType
(570-570)ui/lib/constants/logs.ts (2)
ProviderLabels
(38-53)ProviderName
(20-20)
framework/pricing/main.go (1)
core/schemas/bifrost.go (1)
ModelProvider
(38-38)
transports/bifrost-http/handlers/server.go (3)
plugins/telemetry/main.go (1)
PluginName
(18-18)transports/bifrost-http/handlers/middlewares.go (1)
VKProviderRoutingMiddleware
(50-195)transports/bifrost-http/lib/config.go (1)
Config
(115-142)
plugins/governance/resolver.go (3)
ui/lib/types/governance.ts (1)
VirtualKey
(50-69)framework/configstore/tables.go (2)
TableVirtualKey
(618-641)TableVirtualKey
(690-690)core/schemas/bifrost.go (1)
ModelProvider
(38-38)
ui/app/virtual-keys/views/virtualKeyDialog.tsx (6)
ui/lib/types/governance.ts (2)
VirtualKeyProviderConfig
(71-76)UpdateVirtualKeyRequest
(101-110)transports/bifrost-http/handlers/governance.go (1)
UpdateVirtualKeyRequest
(60-75)ui/lib/constants/logs.ts (3)
ProviderNames
(22-22)ProviderLabels
(38-53)ProviderName
(20-20)ui/lib/constants/icons.tsx (2)
RenderProviderIcon
(564-568)ProviderIconType
(570-570)ui/components/ui/tagInput.tsx (1)
TagInput
(16-74)ui/lib/constants/config.ts (1)
MODEL_PLACEHOLDERS
(5-21)
framework/configstore/sqlite.go (1)
framework/configstore/tables.go (4)
TableVirtualKey
(618-641)TableVirtualKey
(690-690)TableVirtualKeyProviderConfig
(644-650)TableVirtualKeyProviderConfig
(691-693)
ui/lib/constants/config.ts (1)
ui/lib/constants/logs.ts (1)
ProviderName
(20-20)
ui/app/teams-customers/views/teamDialog.tsx (1)
ui/lib/utils/governance.ts (1)
formatCurrency
(27-29)
transports/bifrost-http/handlers/governance.go (1)
framework/configstore/tables.go (2)
TableVirtualKeyProviderConfig
(644-650)TableVirtualKeyProviderConfig
(691-693)
framework/configstore/migrations.go (2)
framework/configstore/internal/migration/migrator.go (3)
New
(131-149)DefaultOptions
(100-106)Migration
(62-69)framework/configstore/tables.go (2)
TableVirtualKeyProviderConfig
(644-650)TableVirtualKeyProviderConfig
(691-693)
framework/configstore/store.go (1)
framework/configstore/tables.go (4)
TableVirtualKey
(618-641)TableVirtualKey
(690-690)TableVirtualKeyProviderConfig
(644-650)TableVirtualKeyProviderConfig
(691-693)
⏰ Context from checks skipped due to timeout of 900000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (31)
- GitHub Check: Graphite / mergeability_check
- GitHub Check: Graphite / mergeability_check
- GitHub Check: Graphite / mergeability_check
- GitHub Check: Graphite / mergeability_check
- GitHub Check: Graphite / mergeability_check
- GitHub Check: Graphite / mergeability_check
- GitHub Check: Graphite / mergeability_check
- GitHub Check: Graphite / mergeability_check
- GitHub Check: Graphite / mergeability_check
- GitHub Check: Graphite / mergeability_check
- GitHub Check: Graphite / mergeability_check
- GitHub Check: Graphite / mergeability_check
- GitHub Check: Graphite / mergeability_check
- GitHub Check: Graphite / mergeability_check
- GitHub Check: Graphite / mergeability_check
- GitHub Check: Graphite / mergeability_check
- GitHub Check: Graphite / mergeability_check
- GitHub Check: Graphite / mergeability_check
- GitHub Check: Graphite / mergeability_check
- GitHub Check: Graphite / mergeability_check
- GitHub Check: Graphite / mergeability_check
- GitHub Check: Graphite / mergeability_check
- GitHub Check: Graphite / mergeability_check
- GitHub Check: Graphite / mergeability_check
- GitHub Check: Graphite / mergeability_check
- GitHub Check: Graphite / mergeability_check
- GitHub Check: Graphite / mergeability_check
- GitHub Check: Graphite / mergeability_check
- GitHub Check: Graphite / mergeability_check
- GitHub Check: Graphite / mergeability_check
- GitHub Check: Graphite / mergeability_check
🔇 Additional comments (3)
ui/app/teams-customers/views/teamDialog.tsx (3)
17-17
: Semantic improvement: Building icon is more appropriate for customers.The change from
User
toBuilding
icon better represents organizational/customer entities in the UI.
188-188
: LGTM!Icon usage correctly updated to match the import change.
217-218
: Minor readability improvement.Adding explicit spacing around the slash improves visual clarity for the usage ratio display.
2dd56b4
to
3d2a3bb
Compare
f2bca7e
to
6874fcd
Compare
3d2a3bb
to
b91d410
Compare
9f3d9bf
to
ba7b44c
Compare
ba7b44c
to
1756b0c
Compare
b91d410
to
612a214
Compare
612a214
to
c2781b9
Compare
1756b0c
to
56fe8f3
Compare
56fe8f3
to
9cf6597
Compare
9cf6597
to
29dfa54
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Table Empty State Column Mismatch
The 'No customers found' empty state row has a colSpan
of 5
. This causes misalignment because the table now has 6 columns after adding the 'Reset Period' column.
ui/app/teams-customers/views/customerTable.tsx#L104-L106
bifrost/ui/app/teams-customers/views/customerTable.tsx
Lines 104 to 106 in 29dfa54
{customers?.length === 0 ? ( | |
<TableRow> | |
<TableCell colSpan={5} className="text-muted-foreground py-8 text-center"> |
c2781b9
to
a825810
Compare
29dfa54
to
555eb29
Compare
555eb29
to
5f648cc
Compare
Summary
Add weighted provider routing for virtual keys, allowing for load balancing between different providers that support the same model.
Changes
TableVirtualKeyProviderConfig
table to store provider configurations for virtual keysAllowedProviders
field withProviderConfigs
in virtual keys to support weighted routingType of change
Affected areas
How to test
Test the weighted provider routing by creating a virtual key with multiple provider configurations:
The system should automatically route to the appropriate provider based on the weights.
Breaking changes
This change replaces the
AllowedProviders
field withProviderConfigs
in virtual keys. Existing virtual keys will need to be updated to use the new provider configuration system.Security considerations
The weighted routing system maintains the same security model as the previous implementation, with provider access still controlled by virtual key permissions.
Checklist