https://retellai.com/?utm_source=discord&utm_medium=seo logo
Cannot find corresponding Retell LLM.
# ❓・bug-report
c
I'm getting this issue after upgrading my node client to ^3.4.0 Here is the code I'm using in Node to register a call. I'm getting a conversationEnded event on the client prematurely with the reason "Cannot find corresponding Retell LLM."
Copy code
export async function registerCall(
  organizationId: number,
  interviewGuideId: number,
) {
  if (!process.env.RETELL_API_KEY) {
    throw new Error("RETELL_API_KEY is not set");
  }

  const retell = new Retell({
    apiKey: process.env.RETELL_API_KEY,
  });

  const USER_RESEARCHER_AGENT_ID = "5f2353a28871ef689f72ba147b95b56c";

  const res = await retell.call.register({
    agent_id: USER_RESEARCHER_AGENT_ID,
    audio_encoding: "s16le",
    sample_rate: 44100,
    audio_websocket_protocol: "web",
  });

  // insert a record into our db using god client
  // so we can fetch the call details later
  const supabase = getGodClient();

  await supabase
    .from("interview_calls")
    .insert([
      {
        organization_id: organizationId,
        interview_guide_id: interviewGuideId,
        retell_call_id: res.call_id,
        retell_sample_rate: res.sample_rate,
        metadata: {},
      },
    ])
    .throwOnError();

  return {
    data: {
      callId: res.call_id,
      sampleRate: res.sample_rate,
    },
  };
}
Nevermind. I just realized my webhook was set to prod but I was running my client in dev.