Conversation
## Summary Briefly explain the purpose of this PR and the problem it solves. ## Changes - What was changed and why - Any notable design decisions or trade-offs ## 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 Describe the steps to validate this change. Include commands and expected outcomes. ```sh # Core/Transports go version go test ./... # UI cd ui pnpm i || npm i pnpm test || npm test pnpm build || npm run build ``` If adding new configs or environment variables, document them here. ## Screenshots/Recordings If UI changes, add before/after screenshots or short clips. ## Breaking changes - [ ] Yes - [ ] No If yes, describe impact and migration instructions. ## Related issues Link related issues and discussions. Example: Closes #123 ## Security considerations Note any security implications (auth, secrets, PII, sandboxing, etc.). ## 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
|
|
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughSummary by CodeRabbit
Walkthrough
ChangesNil-safe IsActive check and matching test fixtures
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Suggested reviewers
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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" Comment |
Confidence Score: 3/5The handler incorrectly bypasses provider filtering for virtual keys whose IsActive field is nil (the DB-default active state), meaning governance restrictions on model listing are silently dropped for those keys. The nil guard inverts the documented and code-level semantics of IsActive: the struct comment, the DB default, and the existing IsActiveValue() helper all say nil means active, but the handler treats nil as inactive. Any VK stored without an explicit IsActive value will skip provider config enforcement on GET /v1/models, bypassing the filtering this function is meant to enforce. transports/bifrost-http/handlers/list_models_vk.go — the IsActive nil guard needs to be replaced with the IsActiveValue() helper. Important Files Changed
|
| return false | ||
| } | ||
| if vk == nil || !vk.IsActive { | ||
| if vk == nil || vk.IsActive == nil || !*vk.IsActive { |
There was a problem hiding this comment.
Nil
IsActive is semantically active per the field definition (// Nil means true (DB default); false means inactive), but this guard treats it as inactive — provider configs will be silently ignored for any VK whose IsActive field is nil. A helper IsActiveValue() already exists on the struct that handles this correctly; using it eliminates the inversion.
| if vk == nil || vk.IsActive == nil || !*vk.IsActive { | |
| if vk == nil || !vk.IsActiveValue() { |
* origin/dev: (76 commits) fix: deterministic MCP tool ordering for prompt cache stability (maximhq#4588) enterprise changelog (maximhq#4586) Adds changelog for v1.5.16 --skip-ci transports: update dependencies --skip-ci fixes go worspace setup for cost-accuracy and load-test (maximhq#4585) plugins/telemetry: bump core to v1.5.22 and framework to v1.3.22 --skip-ci plugins/semanticcache: bump core to v1.5.22 and framework to v1.3.22 --skip-ci plugins/prompts: bump core to v1.5.22 and framework to v1.3.22 --skip-ci plugins/otel: bump core to v1.5.22 and framework to v1.3.22 --skip-ci plugins/modelcatalogresolver: bump core to v1.5.22 and framework to v1.3.22 --skip-ci plugins/mocker: bump core to v1.5.22 and framework to v1.3.22 --skip-ci plugins/maxim: bump core to v1.5.22 and framework to v1.3.22 --skip-ci plugins/logging: bump core to v1.5.22 and framework to v1.3.22 --skip-ci plugins/jsonparser: bump core to v1.5.22 and framework to v1.3.22 --skip-ci plugins/governance: bump core to v1.5.22 and framework to v1.3.22 --skip-ci plugins/compat: bump core to v1.5.22 and framework to v1.3.22 --skip-ci framework: bump core to v1.5.22 --skip-ci build fix (maximhq#4584) build fix chore: regenerate openapi.json --skip-ci ... # Conflicts: # .github/workflows/scripts/cost-accuracy-test.sh # core/changelog.md # tests/config.json # tests/integrations/python/config.json
No description provided.