MCPcopy Index your code
hub / github.com/coder/coder / updateChatProviderConfig

Function updateChatProviderConfig

site/src/api/queries/chats.ts:1799–1820  ·  view source on GitHub ↗
(queryClient: QueryClient)

Source from the content-addressed store, hash-verified

1797};
1798
1799export const updateChatProviderConfig = (queryClient: QueryClient) => ({
1800 mutationFn: async ({
1801 providerConfigId,
1802 req,
1803 }: UpdateChatProviderConfigMutationArgs) => {
1804 const apiKey = req.api_key;
1805 return API.experimental.updateAIProvider(providerConfigId, {
1806 display_name: req.display_name,
1807 base_url: req.base_url,
1808 enabled: req.enabled,
1809 api_keys:
1810 req.api_key === undefined
1811 ? undefined
1812 : apiKey
1813 ? [{ api_key: apiKey }]
1814 : [],
1815 });
1816 },
1817 onSuccess: async () => {
1818 await invalidateChatConfigurationQueries(queryClient);
1819 },
1820});
1821
1822export const deleteChatProviderConfig = (queryClient: QueryClient) => ({
1823 mutationFn: (providerConfigId: string) =>

Callers 2

AgentSettingsModelsPageFunction · 0.90

Calls 1

Tested by

no test coverage detected