Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions ui/app/workspace/providers/fragments/deploymentsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,41 @@ function BedrockSection({ config, onChange, disabled }: ProviderSectionProps) {
disabled={disabled}
/>
</FieldRow>
<FieldRow label="Project ID" hint="Scope this deployment's Bedrock Mantle (gpt-*/Gemma) calls to a specific project via the OpenAI-Project header. Leave blank to use the key's project.">
<SecretVarField
value={config.project_id}
onChange={(v) => onChange({ project_id: v })}
placeholder="proj_xxxxxxxx or env.BEDROCK_PROJECT_ID"
disabled={disabled}
/>
</FieldRow>
Comment thread
impoiler marked this conversation as resolved.
</div>
);
}

function BedrockMantleSection({ config, onChange, disabled }: ProviderSectionProps) {
return (
<div className="space-y-4">
<SectionHeader
title="Bedrock Mantle overrides"
description="Override key-level Bedrock Mantle defaults for this deployment. Leave blank to use the key's settings."
/>
<FieldRow label="Region">
<SecretVarField
value={config.region}
onChange={(v) => onChange({ region: v })}
placeholder="us-east-1 or env.BEDROCK_REGION"
disabled={disabled}
/>
</FieldRow>
<FieldRow label="Project ID" hint="Scope this deployment to a specific project via the OpenAI-Project / anthropic-workspace-id header. Leave blank to use the key's project.">
<SecretVarField
value={config.project_id}
onChange={(v) => onChange({ project_id: v })}
placeholder="proj_xxxxxxxx or env.BEDROCK_PROJECT_ID"
disabled={disabled}
/>
</FieldRow>
</div>
);
}
Expand Down Expand Up @@ -265,6 +300,8 @@ function ProviderSection({ providerName, ...props }: ProviderSectionProps & { pr
return <VertexSection {...props} />;
case "bedrock":
return <BedrockSection {...props} />;
case "bedrock_mantle":
return <BedrockMantleSection {...props} />;
case "replicate":
return <ReplicateSection {...props} />;
default:
Expand Down
5 changes: 4 additions & 1 deletion ui/lib/types/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,11 @@ export interface AliasConfig {
api_version?: string;
anthropic_version?: string;
endpoint?: SecretVar;
// Vertex overrides
// Shared per-alias project override (Vertex GCP project; Bedrock / Bedrock Mantle
Comment thread
impoiler marked this conversation as resolved.
// project sent via OpenAI-Project / anthropic-workspace-id). Kept top-level in Go
// so the flat project_id key doesn't collide across embedded sub-configs.
Comment thread
impoiler marked this conversation as resolved.
project_id?: SecretVar;
Comment thread
impoiler marked this conversation as resolved.
// Vertex overrides
project_number?: SecretVar;
force_single_region?: boolean;
// Bedrock overrides
Expand Down
3 changes: 2 additions & 1 deletion ui/lib/types/schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,9 @@ const aliasConfigObjectSchema = z.object({
api_version: z.string().optional(),
anthropic_version: z.string().optional(),
endpoint: secretVarSchema.optional(),
// Vertex overrides
// Shared per-alias project override (Vertex / Bedrock / Bedrock Mantle)
project_id: secretVarSchema.optional(),
// Vertex overrides
project_number: secretVarSchema.optional(),
force_single_region: z.boolean().optional(),
// Bedrock overrides
Expand Down
Loading