Scheduling infrastructure for absolutely everyone.
fix: remove deprecated fields from retell ai (#21790)
Udit Takkar200b9d037cae
diff --git a/packages/features/ee/cal-ai-phone/retellAIService.ts b/packages/features/ee/cal-ai-phone/retellAIService.tsindex 74531634957..7436751b31d 100644--- a/packages/features/ee/cal-ai-phone/retellAIService.ts+++ b/packages/features/ee/cal-ai-phone/retellAIService.ts@@ -1,4 +1,3 @@-import { WEBAPP_URL } from "@calcom/lib/constants";import logger from "@calcom/lib/logger";import { fetcher } from "@calcom/lib/retellAIFetcher";import { safeStringify } from "@calcom/lib/safeStringify";@@ -77,7 +76,6 @@ class CreateRetellLLMCommand implements Command<TCreateRetellLLMSchema> {body: JSON.stringify({general_prompt: this.props.generalPrompt,begin_message: this.props.beginMessage,- inbound_dynamic_variables_webhook_url: `${WEBAPP_URL}/api/get-inbound-dynamic-variables`,general_tools: [{type: "end_call",@@ -102,13 +100,6 @@ class CreateRetellLLMCommand implements Command<TCreateRetellLLMSchema> {}),}).then(ZCreateRetellLLMSchema.parse);- const llmWebSocketUrlToBeUpdated = createdRetellLLM.inbound_dynamic_variables_webhook_url;- await updateAgentWebsocketUrl(- this.props.yourPhoneNumber,- llmWebSocketUrlToBeUpdated,- createdRetellLLM.llm_id- );-return createdRetellLLM;} catch (error) {log.error("Unable to Create Retell LLM", safeStringify(error));@@ -141,17 +132,9 @@ class UpdateRetellLLMCommand implements Command<TGetRetellLLMSchema> {body: JSON.stringify({general_prompt: this.props.generalPrompt,begin_message: this.props.beginMessage,- inbound_dynamic_variables_webhook_url: `${WEBAPP_URL}/api/get-inbound-dynamic-variables`,}),}).then(ZGetRetellLLMSchema.parse);- const llmWebSocketUrlToBeUpdated = updatedRetellLLM.inbound_dynamic_variables_webhook_url;- await updateAgentWebsocketUrl(- this.props.yourPhoneNumber,- llmWebSocketUrlToBeUpdated,- updatedRetellLLM.llm_id- );-return updatedRetellLLM;} catch (err) {log.error("Unable to Update Retell LLM", safeStringify(err));diff --git a/packages/features/ee/cal-ai-phone/zod-utils.ts b/packages/features/ee/cal-ai-phone/zod-utils.tsindex 2e0c54c7742..571b984002d 100644--- a/packages/features/ee/cal-ai-phone/zod-utils.ts+++ b/packages/features/ee/cal-ai-phone/zod-utils.ts@@ -123,7 +123,7 @@ export const ZCreateRetellLLMSchema = z.object({llm_id: z.string(),llm_websocket_url: z.string().optional(),- inbound_dynamic_variables_webhook_url: z.string(),+ inbound_dynamic_variables_webhook_url: z.string().optional(),}).passthrough();@@ -135,7 +135,7 @@ export const ZGetRetellLLMSchema = zbegin_message: z.string().nullable().optional(),llm_id: z.string(),llm_websocket_url: z.string().optional(),- inbound_dynamic_variables_webhook_url: z.string(),+ inbound_dynamic_variables_webhook_url: z.string().optional(),general_tools: z.array(z.object({