From 92f71676099b2a13c84c4e21bb16dc482d79684b Mon Sep 17 00:00:00 2001 From: Anuj Parihar Date: Fri, 12 Jun 2026 00:54:38 +0530 Subject: [PATCH 1/2] chore: add mcp library url to helm --- helm-charts/bifrost/templates/_helpers.tpl | 8 +- helm-charts/bifrost/values.schema.json | 155 ++++++++++++++++++--- helm-charts/bifrost/values.yaml | 4 + 3 files changed, 149 insertions(+), 18 deletions(-) diff --git a/helm-charts/bifrost/templates/_helpers.tpl b/helm-charts/bifrost/templates/_helpers.tpl index 6612ba3348..d1fe459942 100644 --- a/helm-charts/bifrost/templates/_helpers.tpl +++ b/helm-charts/bifrost/templates/_helpers.tpl @@ -332,7 +332,13 @@ false {{- if .Values.bifrost.framework.pricing.pricingSyncInterval }} {{- $_ := set $pricing "pricing_sync_interval" .Values.bifrost.framework.pricing.pricingSyncInterval }} {{- end }} -{{- if or $pricing.pricing_url $pricing.pricing_sync_interval }} +{{- if .Values.bifrost.framework.pricing.mcpLibraryUrl }} +{{- $_ := set $pricing "mcp_library_url" .Values.bifrost.framework.pricing.mcpLibraryUrl }} +{{- end }} +{{- if .Values.bifrost.framework.pricing.mcpLibrarySyncInterval }} +{{- $_ := set $pricing "mcp_library_sync_interval" .Values.bifrost.framework.pricing.mcpLibrarySyncInterval }} +{{- end }} +{{- if or $pricing.pricing_url $pricing.model_parameters_url $pricing.pricing_sync_interval $pricing.mcp_library_url $pricing.mcp_library_sync_interval }} {{- $_ := set $framework "pricing" $pricing }} {{- end }} {{- end }} diff --git a/helm-charts/bifrost/values.schema.json b/helm-charts/bifrost/values.schema.json index ddb7d97f10..888a07da0c 100644 --- a/helm-charts/bifrost/values.schema.json +++ b/helm-charts/bifrost/values.schema.json @@ -485,6 +485,19 @@ "description": "Pricing sync interval in seconds. Default is 24 hours. Minimum is 3600 seconds (1 hour).", "default": 86400, "minimum": 3600 + }, + "mcpLibraryUrl": { + "description": "URL to a custom MCP server catalog. Leave empty to use the default Bifrost catalog.", + "anyOf": [ + {"type": "string", "format": "uri"}, + {"const": ""} + ] + }, + "mcpLibrarySyncInterval": { + "type": "integer", + "description": "MCP library sync interval in seconds. Default is 24 hours. Minimum is 3600 seconds (1 hour).", + "default": 86400, + "minimum": 3600 } }, "additionalProperties": false @@ -2174,6 +2187,15 @@ "role": { "type": "string", "description": "Bifrost role to assign on match" + }, + "attributeType": { + "type": "string", + "enum": ["user", "group"], + "description": "SCIM provisioning type: 'user' matches SCIM User attributes, 'group' matches SCIM Group displayName" + }, + "attributeValue": { + "type": "string", + "description": "SCIM attribute value to match (for attributeType 'user': the SCIM user attribute value; for 'group': the SCIM group displayName, auto-set to 'displayName')" } }, "required": ["attribute", "value", "role"], @@ -2216,7 +2238,7 @@ "type": "object", "properties": { "attribute": { "type": "string", "description": "JWT claim name" }, - "value": { "type": "string", "description": "Claim value to match" }, + "value": { "type": "string", "description": "Claim value to match. Wildcard '*' will use the claim as is the name of the business unit to assign." }, "business_unit": { "type": "string", "description": "Bifrost business unit slug to assign" @@ -2231,7 +2253,7 @@ "description": "SCIM attribute value to match (for 'user': SCIM user attribute value; for 'group': SCIM group displayName, auto-set to 'displayName')" } }, - "required": ["attribute", "value", "business_unit"], + "required": ["attribute", "value"], "additionalProperties": false } } @@ -2319,6 +2341,15 @@ "role": { "type": "string", "description": "Bifrost role to assign on match" + }, + "attributeType": { + "type": "string", + "enum": ["user", "group"], + "description": "SCIM provisioning type: 'user' matches SCIM User attributes, 'group' matches SCIM Group displayName" + }, + "attributeValue": { + "type": "string", + "description": "SCIM attribute value to match (for attributeType 'user': the SCIM user attribute value; for 'group': the SCIM group displayName, auto-set to 'displayName')" } }, "required": ["attribute", "value", "role"], @@ -2327,13 +2358,22 @@ }, "attributeTeamMappings": { "type": "array", - "description": "Attribute -> team mappings (all matches apply). Use value '*' for pass-through (every claim value becomes a team name).", + "description": "Attribute -> team mappings (all matches apply). Use value '*' for pass-through. Add attributeType/attributeValue to enable SCIM provisioning for a mapping.", "items": { "type": "object", "properties": { - "attribute": { "type": "string" }, - "value": { "type": "string" }, - "team": { "type": "string" } + "attribute": { "type": "string", "description": "JWT claim name" }, + "value": { "type": "string", "description": "Claim value to match, or '*' for pass-through" }, + "team": { "type": "string", "description": "Bifrost team slug to assign. In case of '*' value, leave this empty" }, + "attributeType": { + "type": "string", + "enum": ["user", "group"], + "description": "SCIM provisioning type: 'user' matches SCIM User attributes, 'group' matches SCIM Group displayName" + }, + "attributeValue": { + "type": "string", + "description": "SCIM attribute value to match (for 'user': SCIM user attribute value; for 'group': SCIM group displayName, auto-set to 'displayName')" + } }, "required": ["attribute", "value", "team"], "additionalProperties": false @@ -2341,15 +2381,24 @@ }, "attributeBusinessUnitMappings": { "type": "array", - "description": "Attribute -> business-unit mappings (all matches apply).", + "description": "Attribute -> business-unit mappings (all matches apply). Add attributeType/attributeValue to enable SCIM provisioning for a mapping.", "items": { "type": "object", "properties": { - "attribute": { "type": "string" }, - "value": { "type": "string" }, - "business_unit": { "type": "string" } + "attribute": { "type": "string", "description": "JWT claim name" }, + "value": { "type": "string", "description": "Claim value to match. Wildcard '*' will use the claim as is the name of the business unit to assign." }, + "business_unit": { "type": "string", "description": "Bifrost business unit slug to assign. In case of '*' value, leave this empty" }, + "attributeType": { + "type": "string", + "enum": ["user", "group"], + "description": "SCIM provisioning type: 'user' matches SCIM User attributes, 'group' matches SCIM Group displayName" + }, + "attributeValue": { + "type": "string", + "description": "SCIM attribute value to match (for 'user': SCIM user attribute value; for 'group': SCIM group displayName, auto-set to 'displayName')" + } }, - "required": ["attribute", "value", "business_unit"], + "required": ["attribute", "value"], "additionalProperties": false } } @@ -2458,10 +2507,10 @@ "type": "object", "properties": { "attribute": { "type": "string" }, - "value": { "type": "string" }, + "value": { "type": "string", "description": "Claim value to match. Wildcard '*' will use the claim as is the name of the business unit to assign." }, "business_unit": { "type": "string" } }, - "required": ["attribute", "value", "business_unit"], + "required": ["attribute", "value"], "additionalProperties": false } } @@ -2560,10 +2609,10 @@ "type": "object", "properties": { "attribute": { "type": "string" }, - "value": { "type": "string" }, + "value": { "type": "string", "description": "Claim value to match. Wildcard '*' will use the claim as is the name of the business unit to assign." }, "business_unit": { "type": "string" } }, - "required": ["attribute", "value", "business_unit"], + "required": ["attribute", "value"], "additionalProperties": false } } @@ -2672,10 +2721,10 @@ "type": "object", "properties": { "attribute": { "type": "string" }, - "value": { "type": "string" }, + "value": { "type": "string", "description": "Claim value to match. Wildcard '*' will use the claim as is the name of the business unit to assign." }, "business_unit": { "type": "string" } }, - "required": ["attribute", "value", "business_unit"], + "required": ["attribute", "value"], "additionalProperties": false } } @@ -4292,6 +4341,78 @@ }, "required": ["url", "model_name"], "additionalProperties": false + }, + "aliases": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string", + "minLength": 1, + "description": "Legacy shape: a bare provider-specific identifier. Equivalent to {\"model_id\": \"\"}." + }, + { + "type": "object", + "properties": { + "model_id": { + "type": "string", + "minLength": 1, + "description": "Provider-specific identifier sent on the wire (deployment name, inference profile ID, fine-tuned model ID, etc.)." + }, + "model_name": { + "type": "string", + "description": "Canonical model name used for pricing, logging, and family inference." + }, + "model_family": { + "type": "string", + "enum": ["anthropic", "openai", "mistral", "cohere", "gemini", "nova", "titan"], + "description": "Underlying model family. Used by provider routing without substring-sniffing the wire model ID." + }, + "description": { + "type": "string" + }, + "region": { + "type": "string", + "description": "Per-alias region override (can use env. prefix)." + }, + "api_version": { + "type": "string", + "description": "Azure OpenAI api-version override for this alias." + }, + "anthropic_version": { + "type": "string", + "description": "Azure anthropic-version header override for Claude-on-Azure deployments." + }, + "endpoint": { + "type": "string", + "description": "Per-alias Azure endpoint override (can use env. prefix)." + }, + "project_id": { + "type": "string", + "description": "Per-alias Vertex project ID override (can use env. prefix)." + }, + "project_number": { + "type": "string", + "description": "Per-alias Vertex project number override (can use env. prefix)." + }, + "inference_profile_arn": { + "type": "string", + "description": "Per-alias Bedrock inference profile ARN (can use env. prefix)." + }, + "use_deployments_endpoint": { + "type": "boolean", + "description": "Replicate: use the deployments endpoint instead of the predictions endpoint for this alias." + } + }, + "required": ["model_id"], + "additionalProperties": false + } + ] + }, + "propertyNames": { + "minLength": 1 + }, + "description": "Model alias mappings: each entry maps a user-facing model name to either a bare provider identifier (legacy string shape) or an AliasConfig object carrying the wire identifier plus optional canonical name, family, and provider-specific overrides." } }, "required": ["name", "weight"], diff --git a/helm-charts/bifrost/values.yaml b/helm-charts/bifrost/values.yaml index 4f3100e0c5..2a909f8e08 100644 --- a/helm-charts/bifrost/values.yaml +++ b/helm-charts/bifrost/values.yaml @@ -266,6 +266,10 @@ bifrost: modelParametersUrl: "https://getbifrost.ai/datasheet/model-parameters" # Sync interval in seconds (default: 86400 = 24 hours, minimum: 3600) pricingSyncInterval: 86400 + # Custom MCP server catalog URL (optional, leave empty to use the default Bifrost catalog) + # mcpLibraryUrl: "" + # MCP library sync interval in seconds (default: 86400 = 24 hours, minimum: 3600) + # mcpLibrarySyncInterval: 86400 # Provider configurations (add your provider keys here) # You can specify API keys directly or use env.VAR_NAME syntax to reference environment variables From 8c35268a713b3e578280c8d12aaa8d234907bf2d Mon Sep 17 00:00:00 2001 From: Anuj Parihar Date: Fri, 12 Jun 2026 16:05:33 +0530 Subject: [PATCH 2/2] feat: add server.readBufferSize in helm for headers --- .../scripts/validate-helm-config-fields.sh | 18 ++++++++++++++++++ .../scripts/validate-helm-templates.sh | 4 ++++ helm-charts/bifrost/templates/_helpers.tpl | 10 ++++++++++ helm-charts/bifrost/values.schema.json | 12 ++++++++++++ helm-charts/bifrost/values.yaml | 4 ++++ 5 files changed, 48 insertions(+) diff --git a/.github/workflows/scripts/validate-helm-config-fields.sh b/.github/workflows/scripts/validate-helm-config-fields.sh index 40b61427d1..d24079779e 100755 --- a/.github/workflows/scripts/validate-helm-config-fields.sh +++ b/.github/workflows/scripts/validate-helm-config-fields.sh @@ -219,6 +219,24 @@ assert_field_value 'client.mcp_code_mode_binding_level' '.client.mcp_code_mode_b assert_field_value 'client.mcp_tool_sync_interval' '.client.mcp_tool_sync_interval' '60' assert_field_value 'client.hide_deleted_virtual_keys_in_filters' '.client.hide_deleted_virtual_keys_in_filters' 'true' +############################################################################### +# 1b. Server Config +############################################################################### +echo "" +echo -e "${CYAN}🖥️ 1b - Server Config${NC}" +echo "----------------------" + +cat > "$TMPDIR/values-server.yaml" << 'VALS' +image: + tag: v1.0.0 +bifrost: + server: + readBufferSize: 131072 +VALS + +render_config "$TMPDIR/values-server.yaml" +assert_field_value 'server.read_buffer_size' '.server.read_buffer_size' '131072' + ############################################################################### # 2. Framework (Pricing) ############################################################################### diff --git a/.github/workflows/scripts/validate-helm-templates.sh b/.github/workflows/scripts/validate-helm-templates.sh index ccab87838e..c373092244 100755 --- a/.github/workflows/scripts/validate-helm-templates.sh +++ b/.github/workflows/scripts/validate-helm-templates.sh @@ -310,6 +310,10 @@ test_template "cluster: region (Gap 7)" \ --set bifrost.cluster.gossip.config.failureThreshold=3 \ --set bifrost.cluster.region=us-east-1 +# Gap 9: Server config +test_template "server: readBufferSize (Gap 9)" \ + --set bifrost.server.readBufferSize=131072 + # Gap 8: Combined production-like with all new fields test_template "combined: all new Gap 1-8 fields" \ --set bifrost.client.asyncJobResultTTL=300 \ diff --git a/helm-charts/bifrost/templates/_helpers.tpl b/helm-charts/bifrost/templates/_helpers.tpl index d1fe459942..04515d9b59 100644 --- a/helm-charts/bifrost/templates/_helpers.tpl +++ b/helm-charts/bifrost/templates/_helpers.tpl @@ -318,6 +318,16 @@ false {{- end }} {{- $_ := set $config "client" $client }} {{- end }} +{{- /* Server */ -}} +{{- if .Values.bifrost.server }} +{{- $server := dict }} +{{- if .Values.bifrost.server.readBufferSize }} +{{- $_ := set $server "read_buffer_size" .Values.bifrost.server.readBufferSize }} +{{- end }} +{{- if $server }} +{{- $_ := set $config "server" $server }} +{{- end }} +{{- end }} {{- /* Framework */ -}} {{- if .Values.bifrost.framework }} {{- $framework := dict }} diff --git a/helm-charts/bifrost/values.schema.json b/helm-charts/bifrost/values.schema.json index 888a07da0c..768f46e53b 100644 --- a/helm-charts/bifrost/values.schema.json +++ b/helm-charts/bifrost/values.schema.json @@ -466,6 +466,18 @@ }, "additionalProperties": false }, + "server": { + "type": "object", + "description": "HTTP server configuration", + "properties": { + "readBufferSize": { + "type": "integer", + "description": "Read buffer size in bytes. This controls the size of the buffer used for reading HTTP headers.", + "default": 65536 + } + }, + "additionalProperties": false + }, "framework": { "type": "object", "properties": { diff --git a/helm-charts/bifrost/values.yaml b/helm-charts/bifrost/values.yaml index 2a909f8e08..fe3b8bdf5c 100644 --- a/helm-charts/bifrost/values.yaml +++ b/helm-charts/bifrost/values.yaml @@ -257,6 +257,10 @@ bifrost: # whitelistedRoutes: [] # Routes that bypass auth middleware # routingChainMaxDepth: 10 # Maximum depth for routing rule chain evaluation + # Server configuration + server: + readBufferSize: 65536 # Read buffer size in bytes for reading HTTP headers (default: 64 KiB) + # Framework configuration framework: pricing: