Skip to content

Commit d0c349e

Browse files
committed
fix: add missing couponCodeSet and aws fields to oRPC schema
The ProviderConfigInfoSchema was missing couponCodeSet (for Mux Gateway) and aws (for Bedrock). oRPC strips fields not in the schema, so these values were never reaching the frontend UI.
1 parent 936bfc4 commit d0c349e

File tree

2 files changed

+58
-68
lines changed

2 files changed

+58
-68
lines changed

src/common/orpc/schemas/api.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,21 @@ export const tokenizer = {
3939
};
4040

4141
// Providers
42+
export const AWSCredentialStatusSchema = z.object({
43+
region: z.string().optional(),
44+
bearerTokenSet: z.boolean(),
45+
accessKeyIdSet: z.boolean(),
46+
secretAccessKeySet: z.boolean(),
47+
});
48+
4249
export const ProviderConfigInfoSchema = z.object({
4350
apiKeySet: z.boolean(),
4451
baseUrl: z.string().optional(),
4552
models: z.array(z.string()).optional(),
53+
/** AWS-specific fields (only present for bedrock provider) */
54+
aws: AWSCredentialStatusSchema.optional(),
55+
/** Mux Gateway-specific fields */
56+
couponCodeSet: z.boolean().optional(),
4657
});
4758

4859
export const ProvidersConfigMapSchema = z.record(z.string(), ProviderConfigInfoSchema);

tests/testUtils.js

Lines changed: 47 additions & 68 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)