Skip to content

feat: model_parameters_url configuration via config JSON and Helm chart - #3609

Merged
akshaydeo merged 4 commits into
devfrom
05-20-feat_model_parameters_url_configuration_via_config_json_and_helm_chart
May 20, 2026
Merged

feat: model_parameters_url configuration via config JSON and Helm chart#3609
akshaydeo merged 4 commits into
devfrom
05-20-feat_model_parameters_url_configuration_via_config_json_and_helm_chart

Conversation

@impoiler

Copy link
Copy Markdown
Contributor

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.

# 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

@coderabbitai

coderabbitai Bot commented May 20, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Summary by CodeRabbit

  • Chores
    • Added an optional model parameters URL setting to framework pricing configuration across deployments, chart values/templates, and runtime schemas. Existing pricing sync intervals and behavior are unchanged when unset. No public APIs or exported interfaces were modified.

Walkthrough

Adds an optional model_parameters_url field to pricing configuration across schema definitions, Helm chart values/schema and template rendering, and example JSON configs; existing pricing_sync_interval is unchanged.

Changes

Model Parameters URL Pricing Configuration

Layer / File(s) Summary
Configuration Schema Definitions
transports/config.schema.json, helm-charts/bifrost/values.schema.json
pricing_config schema in transports adds an optional model_parameters_url (string, format: uri), and Helm bifrost.framework.pricing schema adds modelParametersUrl (string).
Helm Values and Template Integration
helm-charts/bifrost/values.yaml, helm-charts/bifrost/templates/_helpers.tpl
Helm values introduce bifrost.framework.pricing.modelParametersUrl and the template helper conditionally renders model_parameters_url into the generated framework.pricing JSON when set.
Example Configuration Instances
examples/configs/withframework/config.json, examples/dockers/data/config.json
Example JSON configs now include model_parameters_url in the framework.pricing block alongside existing pricing settings (no other changes).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 I hop through JSON, snug and neat,
A tiny URL finds its seat,
In schemas, Helm, and examples too,
Model params now join the brew,
A cheerful hop — configs complete!

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is entirely empty/template-only with no actual implementation details, changes explanation, testing steps, or design decisions filled in. Complete the description sections: add a summary explaining the purpose, detail what was changed and why, specify the type of change (Feature), mark affected areas, provide concrete testing steps, and clarify if there are breaking changes.
Linked Issues check ⚠️ Warning The linked issue #123 requests Files API support for providers (OpenAI, Anthropic) for file uploads and RAG workflows, which is unrelated to the PR's model_parameters_url configuration changes. Verify the correct issue is linked or clarify the connection between model_parameters_url configuration and Files API support requirements.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The PR title clearly and specifically describes the main change: adding model_parameters_url configuration support via config JSON and Helm chart.
Out of Scope Changes check ✅ Passed All changes are in-scope configuration updates: adding model_parameters_url to config schemas, Helm values, and templates. No unrelated modifications detected.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 05-20-feat_model_parameters_url_configuration_via_config_json_and_helm_chart

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

@impoiler
impoiler marked this pull request as ready for review May 20, 2026 06:36
@impoiler
impoiler requested a review from a team as a code owner May 20, 2026 06:36
@impoiler
impoiler force-pushed the 05-20-feat_made_model_parameters_url_configurable branch from aa5a41d to a329ffb Compare May 20, 2026 06:37
@impoiler
impoiler force-pushed the 05-20-feat_model_parameters_url_configuration_via_config_json_and_helm_chart branch from 3754f4e to 27cb862 Compare May 20, 2026 06:37

@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.

Caution

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

⚠️ Outside diff range comments (1)
helm-charts/bifrost/templates/_helpers.tpl (1)

337-345: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Include model_parameters_url in the pricing-block emission guard.

model_parameters_url is mapped, but framework.pricing is only emitted when pricing_url or pricing_sync_interval exists. If only modelParametersUrl is set, the new field is silently dropped.

💡 Proposed fix
-{{- if or $pricing.pricing_url $pricing.pricing_sync_interval }}
+{{- if or $pricing.pricing_url $pricing.pricing_sync_interval $pricing.model_parameters_url }}
 {{- $_ := set $framework "pricing" $pricing }}
 {{- end }}
🤖 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 `@helm-charts/bifrost/templates/_helpers.tpl` around lines 337 - 345, The
template currently sets $pricing.model_parameters_url but only emits
$framework.pricing when $pricing.pricing_url or $pricing.pricing_sync_interval
exist, causing model_parameters_url to be dropped; update the emission guard for
$framework "pricing" (the or condition that checks $pricing.pricing_url and
$pricing.pricing_sync_interval) to also check $pricing.model_parameters_url so
that if only model_parameters_url is present the set $framework "pricing"
$pricing call still runs; locate the block that uses the or guard and include
$pricing.model_parameters_url in that condition.
🤖 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.

Outside diff comments:
In `@helm-charts/bifrost/templates/_helpers.tpl`:
- Around line 337-345: The template currently sets $pricing.model_parameters_url
but only emits $framework.pricing when $pricing.pricing_url or
$pricing.pricing_sync_interval exist, causing model_parameters_url to be
dropped; update the emission guard for $framework "pricing" (the or condition
that checks $pricing.pricing_url and $pricing.pricing_sync_interval) to also
check $pricing.model_parameters_url so that if only model_parameters_url is
present the set $framework "pricing" $pricing call still runs; locate the block
that uses the or guard and include $pricing.model_parameters_url in that
condition.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 703741aa-2aed-40f8-b2c2-2a28a71aa665

📥 Commits

Reviewing files that changed from the base of the PR and between aa5a41d and 3754f4e.

📒 Files selected for processing (6)
  • examples/configs/withframework/config.json
  • examples/dockers/data/config.json
  • helm-charts/bifrost/templates/_helpers.tpl
  • helm-charts/bifrost/values.schema.json
  • helm-charts/bifrost/values.yaml
  • transports/config.schema.json

coderabbitai[bot]
coderabbitai Bot previously approved these changes May 20, 2026
@greptile-apps

greptile-apps Bot commented May 20, 2026

Copy link
Copy Markdown
Contributor

Confidence Score: 4/5

Safe to merge once the guard condition in the Helm template is updated to include model_parameters_url; all other changes are straightforward config/schema additions.

The guard condition at line 343 of _helpers.tpl only checks pricing_url and pricing_sync_interval before writing the pricing dict into the framework config — model_parameters_url is silently dropped if it is the sole pricing value configured. This is a noted existing finding on the PR that has not yet been addressed.

helm-charts/bifrost/templates/_helpers.tpl — the guard condition needs to include model_parameters_url

Important Files Changed

Filename Overview
helm-charts/bifrost/templates/_helpers.tpl Adds modelParametersUrl mapping to the pricing dict, but the guard on line 343 (if or $pricing.pricing_url $pricing.pricing_sync_interval) still omits $pricing.model_parameters_url, so the new field is silently dropped when only that value is set.
transports/config.schema.json Adds model_parameters_url as an optional string field with uri format to the pricing schema — straightforward schema addition.
helm-charts/bifrost/values.schema.json Adds modelParametersUrl string field to the pricing section of the Helm values schema — correct and complete.
helm-charts/bifrost/values.yaml Adds modelParametersUrl default value under bifrost.framework.pricing — consistent with other pricing defaults.
examples/configs/withframework/config.json Adds model_parameters_url to example config — straightforward documentation update.
examples/dockers/data/config.json Adds model_parameters_url to Docker example config; pre-existing missing newline at end of file is unrelated to this change.

Reviews (3): Last reviewed commit: "feat: model_parameters_url configuration..." | Re-trigger Greptile

@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.

Caution

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

⚠️ Outside diff range comments (1)
helm-charts/bifrost/templates/_helpers.tpl (1)

343-345: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Include model_parameters_url in the pricing-object emission guard.

model_parameters_url is set on Line 338, but the guard on Line 343 only checks pricing_url and pricing_sync_interval. With only modelParametersUrl configured, framework.pricing is dropped from rendered config.

Proposed fix
-{{- if or $pricing.pricing_url $pricing.pricing_sync_interval }}
+{{- if or $pricing.pricing_url $pricing.pricing_sync_interval $pricing.model_parameters_url }}
 {{- $_ := set $framework "pricing" $pricing }}
 {{- end }}
As per coding guidelines: "always check the stack if there is one for the current PR. do not give localized reviews for the PR, always see all changes in the light of the whole stack of PRs."
🤖 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 `@helm-charts/bifrost/templates/_helpers.tpl` around lines 343 - 345, The guard
that emits framework.pricing only checks $pricing.pricing_url and
$pricing.pricing_sync_interval, so if only model_parameters_url is set the block
is skipped; update the conditional used before calling set (the if or ...) to
also include $pricing.model_parameters_url (i.e. if or $pricing.pricing_url
$pricing.pricing_sync_interval $pricing.model_parameters_url) so
framework.pricing is preserved when model_parameters_url is present while
keeping the existing set $framework "pricing" $pricing behavior.
🤖 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.

Outside diff comments:
In `@helm-charts/bifrost/templates/_helpers.tpl`:
- Around line 343-345: The guard that emits framework.pricing only checks
$pricing.pricing_url and $pricing.pricing_sync_interval, so if only
model_parameters_url is set the block is skipped; update the conditional used
before calling set (the if or ...) to also include $pricing.model_parameters_url
(i.e. if or $pricing.pricing_url $pricing.pricing_sync_interval
$pricing.model_parameters_url) so framework.pricing is preserved when
model_parameters_url is present while keeping the existing set $framework
"pricing" $pricing behavior.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 168bbdc5-ca52-432a-8b08-865df30c39e3

📥 Commits

Reviewing files that changed from the base of the PR and between 3754f4e and 27cb862.

📒 Files selected for processing (6)
  • examples/configs/withframework/config.json
  • examples/dockers/data/config.json
  • helm-charts/bifrost/templates/_helpers.tpl
  • helm-charts/bifrost/values.schema.json
  • helm-charts/bifrost/values.yaml
  • transports/config.schema.json
✅ Files skipped from review due to trivial changes (1)
  • helm-charts/bifrost/values.yaml

@impoiler
impoiler force-pushed the 05-20-feat_model_parameters_url_configuration_via_config_json_and_helm_chart branch from 27cb862 to 685afb8 Compare May 20, 2026 08:29
@impoiler
impoiler force-pushed the 05-20-feat_made_model_parameters_url_configurable branch from a329ffb to 09a6db3 Compare May 20, 2026 08:29

@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.

Caution

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

⚠️ Outside diff range comments (1)
helm-charts/bifrost/templates/_helpers.tpl (1)

343-345: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Include model_parameters_url in the pricing object emission guard.

model_parameters_url is set at Line 338, but the guard at Line 343 only checks pricing_url and pricing_sync_interval. If modelParametersUrl is the only configured pricing field, framework.pricing is dropped from rendered config.

💡 Proposed fix
-{{- if or $pricing.pricing_url $pricing.pricing_sync_interval }}
+{{- if or $pricing.pricing_url $pricing.pricing_sync_interval $pricing.model_parameters_url }}
 {{- $_ := set $framework "pricing" $pricing }}
 {{- end }}
🤖 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 `@helm-charts/bifrost/templates/_helpers.tpl` around lines 343 - 345, The guard
that assigns framework.pricing only checks $pricing.pricing_url and
$pricing.pricing_sync_interval but misses $pricing.model_parameters_url, so if
model_parameters_url is the only pricing field the pricing object is omitted;
update the conditional that wraps the set call (the if or ... block that
currently references $pricing.pricing_url and $pricing.pricing_sync_interval) to
also include $pricing.model_parameters_url so $_ := set $framework "pricing"
$pricing executes when model_parameters_url is present.
🤖 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.

Outside diff comments:
In `@helm-charts/bifrost/templates/_helpers.tpl`:
- Around line 343-345: The guard that assigns framework.pricing only checks
$pricing.pricing_url and $pricing.pricing_sync_interval but misses
$pricing.model_parameters_url, so if model_parameters_url is the only pricing
field the pricing object is omitted; update the conditional that wraps the set
call (the if or ... block that currently references $pricing.pricing_url and
$pricing.pricing_sync_interval) to also include $pricing.model_parameters_url so
$_ := set $framework "pricing" $pricing executes when model_parameters_url is
present.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: bcdd3309-a6fc-4310-95b7-5280b6dd9887

📥 Commits

Reviewing files that changed from the base of the PR and between 27cb862 and 685afb8.

📒 Files selected for processing (6)
  • examples/configs/withframework/config.json
  • examples/dockers/data/config.json
  • helm-charts/bifrost/templates/_helpers.tpl
  • helm-charts/bifrost/values.schema.json
  • helm-charts/bifrost/values.yaml
  • transports/config.schema.json
✅ Files skipped from review due to trivial changes (1)
  • examples/dockers/data/config.json

@impoiler impoiler self-assigned this May 20, 2026
@BearTS
BearTS force-pushed the 05-20-feat_model_parameters_url_configuration_via_config_json_and_helm_chart branch from 685afb8 to 9c719ee Compare May 20, 2026 09:00

@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.

Caution

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

⚠️ Outside diff range comments (1)
helm-charts/bifrost/templates/_helpers.tpl (1)

337-345: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Include model_parameters_url in the pricing object guard

Line 343 should also check $pricing.model_parameters_url; otherwise Line 337-339 can be dropped from rendered config when it’s the only pricing field set.

Suggested fix
-{{- if or $pricing.pricing_url $pricing.pricing_sync_interval }}
+{{- if or $pricing.pricing_url $pricing.pricing_sync_interval $pricing.model_parameters_url }}
 {{- $_ := set $framework "pricing" $pricing }}
 {{- end }}

As per coding guidelines: "**: always check the stack if there is one for the current PR. do not give localized reviews for the PR, always see all changes in the light of the whole stack of PRs".

🤖 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 `@helm-charts/bifrost/templates/_helpers.tpl` around lines 337 - 345, The
template currently sets $pricing.model_parameters_url but the guard that assigns
$framework.pricing only checks $pricing.pricing_url and
$pricing.pricing_sync_interval, so if model_parameters_url is the only pricing
field it will be dropped; update the conditional that calls set $framework
"pricing" $pricing to include $pricing.model_parameters_url in the or check
(i.e., ensure the guard tests $pricing.model_parameters_url along with
$pricing.pricing_url and $pricing.pricing_sync_interval) so the pricing object
is preserved when model_parameters_url is the sole field.
🤖 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.

Outside diff comments:
In `@helm-charts/bifrost/templates/_helpers.tpl`:
- Around line 337-345: The template currently sets $pricing.model_parameters_url
but the guard that assigns $framework.pricing only checks $pricing.pricing_url
and $pricing.pricing_sync_interval, so if model_parameters_url is the only
pricing field it will be dropped; update the conditional that calls set
$framework "pricing" $pricing to include $pricing.model_parameters_url in the or
check (i.e., ensure the guard tests $pricing.model_parameters_url along with
$pricing.pricing_url and $pricing.pricing_sync_interval) so the pricing object
is preserved when model_parameters_url is the sole field.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 023b3e5d-4d8d-4870-92ec-d70d342a7349

📥 Commits

Reviewing files that changed from the base of the PR and between 685afb8 and 9c719ee.

📒 Files selected for processing (6)
  • examples/configs/withframework/config.json
  • examples/dockers/data/config.json
  • helm-charts/bifrost/templates/_helpers.tpl
  • helm-charts/bifrost/values.schema.json
  • helm-charts/bifrost/values.yaml
  • transports/config.schema.json
✅ Files skipped from review due to trivial changes (3)
  • examples/configs/withframework/config.json
  • transports/config.schema.json
  • examples/dockers/data/config.json

akshaydeo commented May 20, 2026

Copy link
Copy Markdown
Contributor

Merge activity

  • May 20, 9:03 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • May 20, 9:06 AM UTC: @akshaydeo merged this pull request with Graphite.

@akshaydeo
akshaydeo changed the base branch from 05-20-feat_made_model_parameters_url_configurable to graphite-base/3609 May 20, 2026 09:05
@akshaydeo
akshaydeo changed the base branch from graphite-base/3609 to dev May 20, 2026 09:05
@akshaydeo
akshaydeo dismissed coderabbitai[bot]’s stale review May 20, 2026 09:05

The base branch was changed.

@akshaydeo
akshaydeo merged commit 4b61a09 into dev May 20, 2026
10 checks passed
@akshaydeo
akshaydeo deleted the 05-20-feat_model_parameters_url_configuration_via_config_json_and_helm_chart branch May 20, 2026 09:06
akshaydeo pushed a commit that referenced this pull request May 20, 2026
…rt (#3609)

## 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
@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.

Files API Support

2 participants