Skip to content

chore: update bifrost/core to v1.1.14#220

Merged
akshaydeo merged 1 commit intomainfrom
08-06-chore_update_bifrost_core_dependency_to_v1.1.14
Aug 6, 2025
Merged

chore: update bifrost/core to v1.1.14#220
akshaydeo merged 1 commit intomainfrom
08-06-chore_update_bifrost_core_dependency_to_v1.1.14

Conversation

@Pratham-Mishra04
Copy link
Copy Markdown
Collaborator

Update Bifrost Core Dependency to v1.1.14

This PR updates the Bifrost core dependency from v1.1.8 to v1.1.14 in the Maxim plugin. The update includes:

  1. Replacing goccy/go-json with bytedance/sonic JSON library and its dependencies
  2. Updating the method signature in GetKeysForProvider to include a context parameter
  3. Ensuring consistent core version across both the Maxim plugin and transports module

These changes align the Maxim plugin with the latest core functionality and performance improvements.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Aug 6, 2025

Summary by CodeRabbit

  • Chores

    • Updated several dependencies to newer versions for improved compatibility and performance.
    • Removed and replaced certain indirect dependencies.
    • Adjusted module configurations for better dependency management.
  • Refactor

    • Updated a method signature in the account management logic to include an additional context parameter, enhancing flexibility for future operations.

Walkthrough

This change updates the github.com/maximhq/bifrost/core dependency to version v1.1.14 in the plugins/maxim, transports, and tests/core-providers modules, adjusts several indirect dependencies, removes local replace directives, and modifies the GetKeysForProvider method in BaseAccount to accept a context.Context pointer as its first parameter.

Changes

Cohort / File(s) Change Summary
Maxim Plugin Dependency Update
plugins/maxim/go.mod
Updated github.com/maximhq/bifrost/core from v1.1.8 to v1.1.14. Replaced goccy/go-json with bytedance/sonic and related indirect dependencies. Added several new indirect dependencies.
Maxim Plugin Test Signature Change
plugins/maxim/plugin_test.go
Modified BaseAccount.GetKeysForProvider method to accept a *context.Context as the first parameter. No changes to internal logic.
Transports Dependency Update
transports/go.mod
Updated github.com/maximhq/bifrost/core from v1.1.13 to v1.1.14. Removed the local replace directive for this dependency.
Core Providers Tests Dependency Update
tests/core-providers/go.mod
Updated github.com/maximhq/bifrost/core from v1.1.11 to v1.1.14. Removed the local replace directive for this dependency.

Sequence Diagram(s)

sequenceDiagram
    participant Caller
    participant BaseAccount

    Caller->>BaseAccount: GetKeysForProvider(ctx, providerKey)
    BaseAccount-->>Caller: []Key, error
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Suggested reviewers

  • akshaydeo
  • danpiths

Poem

A hop, a skip, dependencies grow,
Context now travels wherever we go.
Sonic and friends join the code parade,
Old replace paths gently fade.
With every update, our warren’s more bright—
Review these carrots, and all is right! 🥕


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d44b69f and 578f956.

⛔ Files ignored due to path filters (3)
  • plugins/maxim/go.sum is excluded by !**/*.sum
  • tests/core-providers/go.sum is excluded by !**/*.sum
  • transports/go.sum is excluded by !**/*.sum
📒 Files selected for processing (4)
  • plugins/maxim/go.mod (2 hunks)
  • plugins/maxim/plugin_test.go (1 hunks)
  • tests/core-providers/go.mod (1 hunks)
  • transports/go.mod (1 hunks)
🧰 Additional context used
🧠 Learnings (23)
📓 Common learnings
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#54
File: core/schemas/provider.go:148-148
Timestamp: 2025-06-04T03:57:50.981Z
Learning: Breaking changes in the Bifrost codebase are managed by first merging and tagging core schema changes, then updating dependent code references in subsequent steps after the core version is released.
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#103
File: .github/workflows/transport-dependency-update.yml:53-75
Timestamp: 2025-06-20T16:21:18.912Z
Learning: In the bifrost repository's transport dependency update workflow, when updating the core dependency to a new version using `go get`, the go.mod and go.sum files will always change in normal operation, making the safety check for changes more of a defensive programming practice rather than handling a common scenario.
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#202
File: transports/bifrost-http/plugins/governance/resolver.go:183-191
Timestamp: 2025-08-03T20:36:21.906Z
Learning: In the Bifrost governance plugin (transports/bifrost-http/plugins/governance/resolver.go), Pratham-Mishra04 considers the current string matching approach for determining rate limit violation decision types (DecisionTokenLimited vs DecisionRequestLimited) adequate and not important enough to refactor with more robust explicit checks, preferring functional simplicity over theoretical robustness improvements.
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#84
File: transports/bifrost-http/main.go:2-2
Timestamp: 2025-06-15T16:05:13.489Z
Learning: For the Bifrost project, HTTP transport integration routers for new providers (like Mistral and Ollama) are implemented in separate PRs from the core provider support, following a focused PR strategy.
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#152
File: transports/bifrost-http/plugins/logging/utils.go:378-399
Timestamp: 2025-07-10T13:44:14.518Z
Learning: In the Bifrost logging plugin (transports/bifrost-http/plugins/logging/utils.go), Pratham-Mishra04 prefers not to add error handling for JSON unmarshaling operations, considering logging not very critical and being confident that JSON marshalling won't fail in practice.
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#158
File: .github/workflows/transports-release.yml:30-43
Timestamp: 2025-07-18T11:12:28.861Z
Learning: Pratham-Mishra04 relies on branch protection rules and mandatory code reviews for security in the bifrost repository, preferring process controls over technical security measures like environment variable isolation for GitHub Actions workflows. All commits are reviewed before merging to main branch.
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#102
File: README.md:62-66
Timestamp: 2025-06-19T17:03:03.639Z
Learning: Pratham-Mishra04 prefers using the implicit 'latest' tag for the maximhq/bifrost Docker image rather than pinning to specific versions.
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#202
File: transports/bifrost-http/handlers/governance.go:1038-1049
Timestamp: 2025-08-03T20:28:00.857Z
Learning: In the Bifrost governance handler (transports/bifrost-http/handlers/governance.go), Pratham-Mishra04 is comfortable with exposing full error details including err.Error() in production responses for governance API endpoints, prioritizing simplicity over potential information disclosure concerns.
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#103
File: .github/workflows/transport-dependency-update.yml:30-36
Timestamp: 2025-06-19T16:57:25.177Z
Learning: In the bifrost repository, Pratham-Mishra04 prefers to keep GitHub Actions workflows lean and trusts their controlled tagging process for core releases, avoiding unnecessary validation steps that they consider overkill.
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#144
File: transports/bifrost-http/handlers/websocket.go:104-114
Timestamp: 2025-07-08T15:52:07.907Z
Learning: Pratham-Mishra04 considers WebSocket broadcast lock contention optimization non-critical in the Bifrost HTTP transport. They prefer to keep the simpler implementation over optimizing lock duration during network I/O operations when the performance impact is not significant.
Learnt from: connyay
PR: maximhq/bifrost#92
File: core/providers/utils.go:60-64
Timestamp: 2025-06-17T14:04:21.104Z
Learning: The bifrost codebase uses string alias types (like `type ContextKey string`) for context keys consistently across multiple packages including plugins/maxim/main.go and transports/bifrost-http/tracking/plugin.go. This pattern should be maintained for consistency rather than switching to the canonical struct{} approach.
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#135
File: docs/core-package.md:105-116
Timestamp: 2025-06-27T17:07:39.462Z
Learning: In Go, when importing a package, the identifier used to access it is determined by the `package` declaration in the Go source files, not the directory name. For the Bifrost project, the core directory files declare `package bifrost`, so importing `"github.com/maximhq/bifrost/core"` automatically makes it accessible as `bifrost.Init`, `bifrost.Ptr`, etc., without needing an explicit alias.
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#81
File: tests/core-providers/openai_test.go:1-2
Timestamp: 2025-06-16T04:29:53.409Z
Learning: In the Bifrost project, the user prefers to use `package main` for test files in the tests/core-providers directory rather than more descriptive package names like `coreproviders_test`.
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#81
File: tests/core-providers/config/account.go:55-101
Timestamp: 2025-06-16T04:25:00.816Z
Learning: In the Bifrost test account implementation, the user prefers to let Bifrost itself handle missing API key errors rather than adding early validation in the GetKeysForProvider method.
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#65
File: transports/bifrost-http/integrations/anthropic/types.go:140-146
Timestamp: 2025-06-10T13:51:52.859Z
Learning: In Bifrost core v1.0.9, ImageContent.Type was a pointer type (*string accessed via bifrost.Ptr), but in v1.0.10 it was changed to a value type (ImageContentType). When reviewing code, check the core version being used to determine the correct assignment pattern.
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#83
File: core/providers/mistral.go:168-170
Timestamp: 2025-06-15T14:24:49.882Z
Learning: In the Bifrost codebase, performance is prioritized over defensive copying for HTTP service operations. Specifically, shallow slice assignments in provider response handling are acceptable due to object pool reset patterns and JSON unmarshaling behavior that minimize practical data corruption risks.
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#144
File: transports/bifrost-http/handlers/providers.go:45-49
Timestamp: 2025-07-08T16:50:27.699Z
Learning: In the Bifrost project, breaking API changes are acceptable when features are not yet public. This applies to scenarios like changing struct fields from pointer to non-pointer types in request/response structures for unreleased features.
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#214
File: core/providers/azure.go:49-50
Timestamp: 2025-08-05T20:43:59.593Z
Learning: In core/providers/azure.go, the azureTextCompletionResponsePool should use AzureTextResponse type, not schemas.BifrostResponse, to maintain consistency with the acquireAzureTextResponse() and releaseAzureTextResponse() functions that work with *AzureTextResponse objects.
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#55
File: core/providers/anthropic.go:358-388
Timestamp: 2025-06-04T05:37:59.699Z
Learning: User Pratham-Mishra04 prefers not to extract small code duplications (around 2 lines) into helper functions, considering the overhead not worth it for such minor repetition.
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#143
File: core/mcp.go:155-196
Timestamp: 2025-07-08T15:33:47.698Z
Learning: Pratham-Mishra04 prefers not to add explanatory comments for obvious code patterns, such as the unlock/lock strategy around network I/O operations, considering them self-explanatory to experienced developers.
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#141
File: core/bifrost.go:198-272
Timestamp: 2025-07-08T18:30:08.258Z
Learning: Pratham-Mishra04 follows a pattern of implementing core functionality first and deferring non-critical improvements (like race condition fixes, optimizations) to later PRs. This is a reasonable development approach that prioritizes getting the main feature working before addressing edge cases.
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#138
File: docs/usage/go-package/mcp.md:408-412
Timestamp: 2025-07-01T12:40:08.576Z
Learning: Pratham-Mishra04 is okay with keeping bullet list formatting that uses colons after dashes in markdown documentation, even if it triggers linter warnings, preferring functionality over strict formatting rules.
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#150
File: transports/bifrost-http/lib/store.go:370-466
Timestamp: 2025-07-09T04:58:08.229Z
Learning: Pratham-Mishra04 prefers not to add logging or error handling for unreachable code paths in the Bifrost project. When provider types or similar entities are predefined in the system, defensive programming like logging in default cases is considered unnecessary overhead.
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#162
File: tests/core-providers/scenarios/chat_completion_stream.go:103-105
Timestamp: 2025-07-16T04:26:09.288Z
Learning: Pratham-Mishra04 prefers to keep test code simple when it serves its basic functional purpose. For tests that are meant to validate core functionality (like verifying streaming works), they consider hard-coded reasonable limits acceptable rather than making them configurable.
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#148
File: transports/bifrost-http/lib/store.go:880-910
Timestamp: 2025-07-08T17:14:21.544Z
Learning: Pratham-Mishra04 prefers resilient system design where missing environment variables for MCP connections should not cause complete system failure. The system should continue processing other MCP connections even when some fail, maintaining partial functionality rather than implementing fail-fast behavior.
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#138
File: transports/README.md:26-28
Timestamp: 2025-07-01T12:45:06.906Z
Learning: Pratham-Mishra04 prefers keeping documentation examples simple and concise, trusting users to handle production-specific considerations like version pinning themselves rather than cluttering examples with additional notes.
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#148
File: transports/bifrost-http/lib/store.go:1081-1098
Timestamp: 2025-07-08T17:16:50.811Z
Learning: Pratham-Mishra04 prefers practical redaction approaches over theoretical security improvements when the threat model is low-risk, such as admin-only interfaces in the Bifrost project. Fixed-length redaction is acceptable when only trusted administrators will see the redacted values.
📚 Learning: in the bifrost repository's transport dependency update workflow, when updating the core dependency ...
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#103
File: .github/workflows/transport-dependency-update.yml:53-75
Timestamp: 2025-06-20T16:21:18.912Z
Learning: In the bifrost repository's transport dependency update workflow, when updating the core dependency to a new version using `go get`, the go.mod and go.sum files will always change in normal operation, making the safety check for changes more of a defensive programming practice rather than handling a common scenario.

Applied to files:

  • tests/core-providers/go.mod
  • transports/go.mod
  • plugins/maxim/go.mod
📚 Learning: the `core-providers-test` module in `tests/core-providers/` is an internal testing module that will ...
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#81
File: tests/core-providers/go.mod:38-38
Timestamp: 2025-06-16T03:54:48.005Z
Learning: The `core-providers-test` module in `tests/core-providers/` is an internal testing module that will never be consumed as a dependency by external projects, so the replace directive pointing to `../../core` is acceptable for local development and testing purposes.

Applied to files:

  • tests/core-providers/go.mod
📚 Learning: in the bifrost project, the user prefers to use `package main` for test files in the tests/core-prov...
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#81
File: tests/core-providers/openai_test.go:1-2
Timestamp: 2025-06-16T04:29:53.409Z
Learning: In the Bifrost project, the user prefers to use `package main` for test files in the tests/core-providers directory rather than more descriptive package names like `coreproviders_test`.

Applied to files:

  • tests/core-providers/go.mod
  • transports/go.mod
  • plugins/maxim/go.mod
📚 Learning: in go, when importing a package, the identifier used to access it is determined by the `package` dec...
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#135
File: docs/core-package.md:105-116
Timestamp: 2025-06-27T17:07:39.462Z
Learning: In Go, when importing a package, the identifier used to access it is determined by the `package` declaration in the Go source files, not the directory name. For the Bifrost project, the core directory files declare `package bifrost`, so importing `"github.com/maximhq/bifrost/core"` automatically makes it accessible as `bifrost.Init`, `bifrost.Ptr`, etc., without needing an explicit alias.

Applied to files:

  • tests/core-providers/go.mod
  • transports/go.mod
  • plugins/maxim/go.mod
📚 Learning: github.com/stretchr/testify v1.10.0 was released on november 23, 2024 and is the latest stable versi...
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#55
File: core/go.mod:30-36
Timestamp: 2025-06-04T04:52:31.748Z
Learning: github.com/stretchr/testify v1.10.0 was released on November 23, 2024 and is the latest stable version as of 2024-2025. It includes security fixes for CVE-2022-28948 in gopkg.in/yaml.v3 dependency.

Applied to files:

  • tests/core-providers/go.mod
  • transports/go.mod
  • plugins/maxim/go.mod
📚 Learning: go 1.24 was released in february 2025 and is stable and available for use in go.mod files....
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#81
File: tests/core-providers/go.mod:3-4
Timestamp: 2025-06-16T03:55:16.949Z
Learning: Go 1.24 was released in February 2025 and is stable and available for use in go.mod files.

Applied to files:

  • tests/core-providers/go.mod
  • transports/go.mod
  • plugins/maxim/go.mod
📚 Learning: in go module files, `go 1.24.1` (with patch version) can work fine in some setups, contrary to the g...
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#81
File: tests/core-providers/go.mod:3-4
Timestamp: 2025-06-16T04:27:53.538Z
Learning: In Go module files, `go 1.24.1` (with patch version) can work fine in some setups, contrary to the general rule that go directives should only include major.minor versions.

Applied to files:

  • tests/core-providers/go.mod
  • transports/go.mod
  • plugins/maxim/go.mod
📚 Learning: breaking changes in the bifrost codebase are managed by first merging and tagging core schema change...
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#54
File: core/schemas/provider.go:148-148
Timestamp: 2025-06-04T03:57:50.981Z
Learning: Breaking changes in the Bifrost codebase are managed by first merging and tagging core schema changes, then updating dependent code references in subsequent steps after the core version is released.

Applied to files:

  • tests/core-providers/go.mod
  • transports/go.mod
  • plugins/maxim/go.mod
📚 Learning: in the bifrost test suite (tests/core-providers), parallel tests using t.parallel() are not being im...
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#81
File: tests/core-providers/scenarios/automatic_function_calling.go:22-22
Timestamp: 2025-06-16T04:55:11.886Z
Learning: In the Bifrost test suite (tests/core-providers), parallel tests using t.Parallel() are not being implemented currently. The team plans to add parallel test execution in future enhancements.

Applied to files:

  • tests/core-providers/go.mod
  • transports/go.mod
📚 Learning: in the bifrost project, the tests directory structure has `tests/core-providers/` and `tests/transpo...
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#149
File: docs/contributing/README.md:22-27
Timestamp: 2025-07-08T18:12:13.590Z
Learning: In the Bifrost project, the tests directory structure has `tests/core-providers/` and `tests/transports-integrations/` as sibling directories. From `tests/core-providers/`, the correct relative path to reach `tests/transports-integrations/` is `../transports-integrations/`, not `../../tests/transports-integrations/`.

Applied to files:

  • tests/core-providers/go.mod
📚 Learning: in the bifrost system, error returns are of type `bifrosterror` rather than the standard go `error` ...
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#81
File: tests/core-providers/scenarios/complete_end_to_end.go:39-41
Timestamp: 2025-06-16T04:12:05.427Z
Learning: In the Bifrost system, error returns are of type `BifrostError` rather than the standard Go `error` interface. Therefore, use `require.Nilf(t, err, ...)` instead of `require.NoError(t, err)` when checking for errors in Bifrost function calls.

Applied to files:

  • tests/core-providers/go.mod
  • transports/go.mod
  • plugins/maxim/go.mod
📚 Learning: in the bifrost codebase, errors returned from client methods like chatcompletionrequest are of type ...
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#81
File: tests/core-providers/scenarios/end_to_end_tool_calling.go:43-45
Timestamp: 2025-06-16T04:13:55.437Z
Learning: In the Bifrost codebase, errors returned from client methods like ChatCompletionRequest are of type BifrostError, not the standard error interface. For testing these errors, use require.Nilf instead of require.NoErrorf since BifrostError doesn't work with the standard error assertion methods.

Applied to files:

  • tests/core-providers/go.mod
  • transports/go.mod
  • plugins/maxim/go.mod
📚 Learning: in bifrost core v1.0.9, imagecontent.type was a pointer type (*string accessed via bifrost.ptr), but...
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#65
File: transports/bifrost-http/integrations/anthropic/types.go:140-146
Timestamp: 2025-06-10T13:51:52.859Z
Learning: In Bifrost core v1.0.9, ImageContent.Type was a pointer type (*string accessed via bifrost.Ptr), but in v1.0.10 it was changed to a value type (ImageContentType). When reviewing code, check the core version being used to determine the correct assignment pattern.

Applied to files:

  • tests/core-providers/go.mod
  • transports/go.mod
  • plugins/maxim/go.mod
📚 Learning: in the bifrost codebase, errors returned from methods like chatcompletionrequest are of type bifrost...
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#81
File: tests/core-providers/scenarios/simple_chat.go:39-41
Timestamp: 2025-06-16T04:13:42.755Z
Learning: In the Bifrost codebase, errors returned from methods like ChatCompletionRequest are of type BifrostError (a custom error type) rather than the standard Go error interface. Therefore, require.Nilf should be used for error assertions instead of require.NoErrorf.

Applied to files:

  • tests/core-providers/go.mod
  • transports/go.mod
  • plugins/maxim/go.mod
📚 Learning: in the bifrost http transport handlers using fasthttp router, path parameters extracted via ctx.user...
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#202
File: transports/bifrost-http/handlers/governance.go:220-220
Timestamp: 2025-08-03T20:11:26.945Z
Learning: In the Bifrost HTTP transport handlers using fasthttp router, path parameters extracted via ctx.UserValue() can be safely type-asserted to string without additional checks because the router guarantees their presence and type when routes match. Pratham-Mishra04 confirmed that defensive type assertion checks are unnecessary overhead in this context.

Applied to files:

  • transports/go.mod
📚 Learning: in the bifrost codebase, performance is prioritized over defensive copying for http service operatio...
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#83
File: core/providers/mistral.go:168-170
Timestamp: 2025-06-15T14:24:49.882Z
Learning: In the Bifrost codebase, performance is prioritized over defensive copying for HTTP service operations. Specifically, shallow slice assignments in provider response handling are acceptable due to object pool reset patterns and JSON unmarshaling behavior that minimize practical data corruption risks.

Applied to files:

  • transports/go.mod
  • plugins/maxim/go.mod
📚 Learning: in the bifrost logging plugin (transports/bifrost-http/plugins/logging/utils.go), pratham-mishra04 p...
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#152
File: transports/bifrost-http/plugins/logging/utils.go:378-399
Timestamp: 2025-07-10T13:44:14.518Z
Learning: In the Bifrost logging plugin (transports/bifrost-http/plugins/logging/utils.go), Pratham-Mishra04 prefers not to add error handling for JSON unmarshaling operations, considering logging not very critical and being confident that JSON marshalling won't fail in practice.

Applied to files:

  • transports/go.mod
📚 Learning: in the bifrost http transport logging plugin (transports/bifrost-http/plugins/logging/main.go), the ...
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#149
File: transports/bifrost-http/plugins/logging/main.go:0-0
Timestamp: 2025-07-08T18:09:32.147Z
Learning: In the Bifrost HTTP transport logging plugin (transports/bifrost-http/plugins/logging/main.go), the DatabasePath is explicitly set from main.go via a config struct pointing to appDir/logs, so the default value in the NewLoggerPlugin constructor is only used for standalone plugin usage and doesn't affect the main application flow.

Applied to files:

  • transports/go.mod
📚 Learning: the bifrost codebase uses string alias types (like `type contextkey string`) for context keys consis...
Learnt from: connyay
PR: maximhq/bifrost#92
File: core/providers/utils.go:60-64
Timestamp: 2025-06-17T14:04:21.104Z
Learning: The bifrost codebase uses string alias types (like `type ContextKey string`) for context keys consistently across multiple packages including plugins/maxim/main.go and transports/bifrost-http/tracking/plugin.go. This pattern should be maintained for consistency rather than switching to the canonical struct{} approach.

Applied to files:

  • transports/go.mod
  • plugins/maxim/plugin_test.go
📚 Learning: in the google genai integration at transports/bifrost-http/integrations/genai/types.go, the manual u...
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#89
File: transports/bifrost-http/integrations/genai/types.go:22-56
Timestamp: 2025-06-16T14:50:46.859Z
Learning: In the Google GenAI integration at transports/bifrost-http/integrations/genai/types.go, the manual URL-safe base64 decoding implementation (converting - to +, _ to /, and adding padding) is required because base64.RawURLEncoding.DecodeString fails for the specific url encoded bytes format being handled.

Applied to files:

  • transports/go.mod
  • plugins/maxim/go.mod
📚 Learning: in the bifrost test account implementation, the user prefers to let bifrost itself handle missing ap...
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#81
File: tests/core-providers/config/account.go:55-101
Timestamp: 2025-06-16T04:25:00.816Z
Learning: In the Bifrost test account implementation, the user prefers to let Bifrost itself handle missing API key errors rather than adding early validation in the GetKeysForProvider method.

Applied to files:

  • plugins/maxim/plugin_test.go
📚 Learning: in the bifrost project, tejasghatte prefers using modern go 1.22+ syntax like `for range n` for iter...
Learnt from: TejasGhatte
PR: maximhq/bifrost#204
File: plugins/circuitbreaker/plugin_test.go:259-269
Timestamp: 2025-08-04T05:25:37.749Z
Learning: In the Bifrost project, TejasGhatte prefers using modern Go 1.22+ syntax like `for range n` for iterating a specific number of times, considering it sufficiently explicit without needing traditional indexed loops for readability.

Applied to files:

  • plugins/maxim/go.mod
🔇 Additional comments (5)
tests/core-providers/go.mod (1)

6-6: LGTM! Core dependency update aligns with PR objectives.

The update to github.com/maximhq/bifrost/core v1.1.14 and removal of the local replace directive properly transitions from local development to the published version, consistent with the PR's goal of synchronizing core versions across modules.

transports/go.mod (1)

10-10: LGTM! Transports module properly updated to core v1.1.14.

The dependency update maintains consistency across modules and removes the local replace directive as expected for the release workflow.

plugins/maxim/go.mod (2)

6-6: LGTM! Core version synchronized and JSON library migration completed.

The update from v1.1.8 to v1.1.14 brings the Maxim plugin up to date with the latest core functionality.


28-30: JSON library migration successfully implemented.

The transition from goccy/go-json to bytedance/sonic is clearly reflected in the new indirect dependencies, aligning with the performance improvements mentioned in the PR objectives.

Also applies to: 32-32, 35-35, 39-39

plugins/maxim/plugin_test.go (1)

57-57: LGTM! Method signature updated for core v1.1.14 compatibility.

The addition of the context.Context parameter to GetKeysForProvider aligns with the core API changes mentioned in the PR objectives, enabling better request tracing and cancellation support.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 08-06-chore_update_bifrost_core_dependency_to_v1.1.14

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Copy Markdown
Collaborator Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@Pratham-Mishra04 Pratham-Mishra04 marked this pull request as ready for review August 6, 2025 05:02
@Pratham-Mishra04 Pratham-Mishra04 force-pushed the 08-06-chore_update_bifrost_core_dependency_to_v1.1.14 branch from d44b69f to 578f956 Compare August 6, 2025 05:02
@akshaydeo akshaydeo merged commit 2272f31 into main Aug 6, 2025
2 checks passed
@akshaydeo akshaydeo deleted the 08-06-chore_update_bifrost_core_dependency_to_v1.1.14 branch August 31, 2025 17:29
akshaydeo pushed a commit that referenced this pull request Nov 17, 2025
# Update Bifrost Core Dependency to v1.1.14

This PR updates the Bifrost core dependency from v1.1.8 to v1.1.14 in the Maxim plugin. The update includes:

1. Replacing `goccy/go-json` with `bytedance/sonic` JSON library and its dependencies
2. Updating the method signature in `GetKeysForProvider` to include a context parameter
3. Ensuring consistent core version across both the Maxim plugin and transports module

These changes align the Maxim plugin with the latest core functionality and performance improvements.
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