Q168: a connected provider's default model changes without its credential
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
26c3365896
commit
5cd413ffcf
12 files changed
+130
-2
No files matched your search
@@ -17,6 +17,7 @@ export const platformContracts = {
|
||||
setIntegrationKey: z.strictObject({ name: z.enum(INTEGRATION_KEY_NAMES), value: z.string() }) satisfies z.ZodType<C.SetIntegrationKeyInput>,
|
||||
clearIntegrationKey: z.strictObject({ name: z.enum(INTEGRATION_KEY_NAMES) }) satisfies z.ZodType<C.ClearIntegrationKeyInput>,
|
||||
saveProviderCredential: z.strictObject({ orgId: id, providerId: id, secret: z.string(), model: z.string().nullable() }) satisfies z.ZodType<C.SaveProviderCredentialInput>,
|
||||
setProviderModel: z.strictObject({ orgId: id, providerId: id, model: z.string().max(200) }) satisfies z.ZodType<C.SetProviderModelInput>,
|
||||
revokeProviderCredential: z.strictObject({ orgId: id, providerId: id }) satisfies z.ZodType<C.RevokeProviderCredentialInput>,
|
||||
startProviderOAuth: z.strictObject({
|
||||
providerKey: z.string(), enterpriseDomain: z.string().nullable().optional(), orgId: id.optional(), providerId: id.optional(),
|
||||
|
||||
@@ -40,6 +40,7 @@ import { stopAllRuns, stopRun } from "../services/run-control";
|
||||
import { cancelQueuedRun } from "../services/run-cancel";
|
||||
import { runHistory } from "../services/run-history";
|
||||
import { deleteWorkspace, setPrimaryWorkspace, updateWorkspace } from "../services/workspace-admin";
|
||||
import { setProviderModel } from "../services/provider-default-model";
|
||||
|
||||
export interface IpcDeps {
|
||||
connection: DatabaseConnection;
|
||||
@@ -225,6 +226,7 @@ export function registerIpcHandlers(deps: IpcDeps): void {
|
||||
handle("deleteMessage", (input) => mutate(() => chat.deleteMessage(input)));
|
||||
handle("markChatSpaceRead", (input) => mutate(() => chat.markSpaceRead(input)));
|
||||
handle("saveProviderCredential", (input) => mutate(() => providers.saveCredential(input)));
|
||||
handle("setProviderModel", (input) => mutate(() => setProviderModel(deps.connection.db, input)));
|
||||
handle("revokeProviderCredential", async (input) => {
|
||||
try {
|
||||
await providers.revokeCredential(input);
|
||||
|
||||
Reference in new issue
Block a user