make deepgram / gateway the defaults in readme and examples - #1013
Conversation
|
📝 WalkthroughWalkthroughThis PR updates examples and README to replace string-based STT/LLM/TTS configs with instantiated Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
✏️ Tip: You can disable this entire section by setting Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (6)
examples/src/basic_agent.ts (1)
42-55:⚠️ Potential issue | 🟡 MinorInitialize the logger before LLM usage.
This example uses
inference.LLMbut doesn't initialize the logger.💡 Suggested fix
import { type JobContext, type JobProcess, WorkerOptions, cli, defineAgent, inference, + initializeLogger, llm, metrics, voice, } from '@livekit/agents'; import * as livekit from '@livekit/agents-plugin-livekit'; import * as silero from '@livekit/agents-plugin-silero'; import { BackgroundVoiceCancellation } from '@livekit/noise-cancellation-node'; import { fileURLToPath } from 'node:url'; import { z } from 'zod'; +initializeLogger({ pretty: true });Per coding guidelines:
**/*.{ts,tsx}?(test|example): Initialize logger before using any LLM functionality withinitializeLogger({ pretty: true })from '@livekit/agents'.examples/src/manual_shutdown.ts (1)
4-13:⚠️ Potential issue | 🟡 MinorInitialize the logger before any LLM usage.
This example uses LLM tools (lines 29, 38) and
inference.LLM(line 64), but doesn't initialize the logger. AddinitializeLogger({ pretty: true })at the start of theentryfunction before creating the Agent.Proposed fix
import { type JobContext, type JobProcess, WorkerOptions, cli, defineAgent, + initializeLogger, llm, inference, voice, } from '@livekit/agents'; @@ entry: async (ctx: JobContext) => { + initializeLogger({ pretty: true }); const agent = new voice.Agent({examples/src/multi_agent.ts (1)
4-13:⚠️ Potential issue | 🟡 MinorInitialize the logger before any LLM usage.
This example uses
inference.LLM(line 82) and other inference components but doesn't initialize the logger. AddinitializeLogger({ pretty: true })at the beginning of the entry function.✅ Proposed fix
import { type JobContext, type JobProcess, WorkerOptions, cli, defineAgent, + initializeLogger, llm, inference, voice, } from '@livekit/agents'; @@ entry: async (ctx: JobContext) => { + initializeLogger({ pretty: true }); const userdata: StoryData = {};examples/src/basic_tool_call_agent.ts (1)
4-13:⚠️ Potential issue | 🟡 MinorInitialize the logger before any LLM usage.
This example uses LLM tools and inference.LLM, but doesn't initialize the logger. Add
initializeLogger({ pretty: true })at the start of the entry function.Proposed fix
import { type JobContext, type JobProcess, ServerOptions, cli, defineAgent, + initializeLogger, llm, inference, voice, } from '@livekit/agents'; @@ -43,6 +44,7 @@ }, entry: async (ctx: JobContext) => { + initializeLogger({ pretty: true }); const getWeather = llm.tool({examples/src/custom_text_handler.ts (1)
4-12:⚠️ Potential issue | 🟡 MinorInitialize the logger before LLM usage.
This example uses
inference.LLMbut doesn't initialize the logger. AddinitializeLogger({ pretty: true })to the entry function before the LLM is instantiated.✅ Proposed fix
import { type JobContext, type JobProcess, WorkerOptions, cli, defineAgent, + initializeLogger, inference, voice, } from '@livekit/agents'; import * as livekit from '@livekit/agents-plugin-livekit'; @@ entry: async (ctx: JobContext) => { + initializeLogger({ pretty: true }); const agent = new voice.Agent({examples/src/idle_user_timeout_example.ts (1)
9-20:⚠️ Potential issue | 🟡 MinorAdd logger initialization before LLM usage.
This example uses
log()andinference.LLMwithout initializing the logger. AddinitializeLogger({ pretty: true })at the start of theentryfunction.✅ Proposed fix
import { type JobContext, type JobProcess, Task, WorkerOptions, cli, defineAgent, delay, + initializeLogger, inference, log, voice, } from '@livekit/agents'; @@ entry: async (ctx: JobContext) => { + initializeLogger({ pretty: true }); const logger = log();
🤖 Fix all issues with AI agents
In `@examples/src/anam_realtime_agent.ts`:
- Around line 30-34: The example initializes STT/TTS/RealtimeModel without
setting up the SDK logger first; add logger initialization at the top
(import/init area) and call the logger init before any LLM usage such as
voice.AgentSession, inference.STT, inference.TTS or RealtimeModel so logs are
available during model setup and calls; locate the import block and the code
that constructs AgentSession/RealtimeModel and insert the logger initialization
there (ensure it runs before new inference.STT, new inference.TTS, or new
voice.AgentSession).
In `@examples/src/background_audio.ts`:
- Around line 46-49: The example initializes and uses LLM functionality
(llm.tool and new voice.AgentSession) but never calls initializeLogger; add a
call to initializeLogger early in the file (before any llm usage or constructing
AgentSession) so the logger is set up for LLM operations, e.g., invoke
initializeLogger() near the top of examples/src/background_audio.ts before calls
to llm.tool and before creating new voice.AgentSession to ensure logging is
configured.
In `@examples/src/hedra/hedra_avatar.ts`:
- Around line 33-44: Call initializeLogger({ pretty: true }) from
'@livekit/agents' before any LLM usage—specifically before constructing
voice.AgentSession and creating inference.LLM—to satisfy the logging guideline;
add the initializeLogger call at the top of the example (prior to the new
voice.AgentSession(...) block) so logging is configured before inference.LLM is
instantiated.
In `@examples/src/push_to_talk.ts`:
- Around line 31-36: The example initializes an inference.LLM without first
initializing the logger; import initializeLogger and call initializeLogger({
pretty: true }) before creating the voice.AgentSession (where AgentSession and
inference.LLM are used) so the inference logging is configured; update the
top-level imports to include initializeLogger and invoke it prior to
constructing the session/AgentSession instance.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (14)
README.mdexamples/src/anam_realtime_agent.tsexamples/src/background_audio.tsexamples/src/basic_agent.tsexamples/src/basic_tool_call_agent.tsexamples/src/cartesia_tts.tsexamples/src/custom_text_handler.tsexamples/src/hedra/hedra_avatar.tsexamples/src/idle_user_timeout_example.tsexamples/src/lemonslice_realtime_avatar.tsexamples/src/manual_shutdown.tsexamples/src/multi_agent.tsexamples/src/push_to_talk.tsexamples/src/raw_function_description.ts
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (.cursor/rules/agent-core.mdc)
Add SPDX-FileCopyrightText and SPDX-License-Identifier headers to all newly added files with '// SPDX-FileCopyrightText: 2025 LiveKit, Inc.' and '// SPDX-License-Identifier: Apache-2.0'
Files:
examples/src/basic_agent.tsexamples/src/lemonslice_realtime_avatar.tsexamples/src/multi_agent.tsexamples/src/hedra/hedra_avatar.tsexamples/src/basic_tool_call_agent.tsexamples/src/idle_user_timeout_example.tsexamples/src/background_audio.tsexamples/src/custom_text_handler.tsexamples/src/push_to_talk.tsexamples/src/raw_function_description.tsexamples/src/manual_shutdown.tsexamples/src/anam_realtime_agent.ts
**/*.{ts,tsx}?(test|example|spec)
📄 CodeRabbit inference engine (.cursor/rules/agent-core.mdc)
When testing inference LLM, always use full model names from
agents/src/inference/models.ts(e.g., 'openai/gpt-4o-mini' instead of 'gpt-4o-mini')
Files:
examples/src/basic_agent.tsexamples/src/lemonslice_realtime_avatar.tsexamples/src/multi_agent.tsexamples/src/hedra/hedra_avatar.tsexamples/src/basic_tool_call_agent.tsexamples/src/idle_user_timeout_example.tsexamples/src/background_audio.tsexamples/src/custom_text_handler.tsexamples/src/push_to_talk.tsexamples/src/raw_function_description.tsexamples/src/manual_shutdown.tsexamples/src/anam_realtime_agent.ts
**/*.{ts,tsx}?(test|example)
📄 CodeRabbit inference engine (.cursor/rules/agent-core.mdc)
Initialize logger before using any LLM functionality with
initializeLogger({ pretty: true })from '@livekit/agents'
Files:
examples/src/basic_agent.tsexamples/src/lemonslice_realtime_avatar.tsexamples/src/multi_agent.tsexamples/src/hedra/hedra_avatar.tsexamples/src/basic_tool_call_agent.tsexamples/src/idle_user_timeout_example.tsexamples/src/background_audio.tsexamples/src/custom_text_handler.tsexamples/src/push_to_talk.tsexamples/src/raw_function_description.tsexamples/src/manual_shutdown.tsexamples/src/anam_realtime_agent.ts
🧠 Learnings (4)
📓 Common learnings
Learnt from: CR
Repo: livekit/agents-js PR: 0
File: .cursor/rules/agent-core.mdc:0-0
Timestamp: 2026-01-16T14:33:39.551Z
Learning: Applies to **/*.{ts,tsx}?(test|example|spec) : When testing inference LLM, always use full model names from `agents/src/inference/models.ts` (e.g., 'openai/gpt-4o-mini' instead of 'gpt-4o-mini')
Learnt from: CR
Repo: livekit/agents-js PR: 0
File: .cursor/rules/agent-core.mdc:0-0
Timestamp: 2026-01-16T14:33:39.551Z
Learning: Applies to examples/src/test_*.ts : For plugin component debugging (STT, TTS, LLM), create test example files prefixed with `test_` under the examples directory and run with `pnpm build && node ./examples/src/test_my_plugin.ts`
📚 Learning: 2026-01-16T14:33:39.551Z
Learnt from: CR
Repo: livekit/agents-js PR: 0
File: .cursor/rules/agent-core.mdc:0-0
Timestamp: 2026-01-16T14:33:39.551Z
Learning: Applies to **/*.{ts,tsx}?(test|example|spec) : When testing inference LLM, always use full model names from `agents/src/inference/models.ts` (e.g., 'openai/gpt-4o-mini' instead of 'gpt-4o-mini')
Applied to files:
README.mdexamples/src/basic_agent.tsexamples/src/multi_agent.tsexamples/src/basic_tool_call_agent.tsexamples/src/idle_user_timeout_example.tsexamples/src/custom_text_handler.tsexamples/src/push_to_talk.tsexamples/src/raw_function_description.tsexamples/src/manual_shutdown.tsexamples/src/anam_realtime_agent.ts
📚 Learning: 2026-01-16T14:33:39.551Z
Learnt from: CR
Repo: livekit/agents-js PR: 0
File: .cursor/rules/agent-core.mdc:0-0
Timestamp: 2026-01-16T14:33:39.551Z
Learning: Applies to examples/src/test_*.ts : For plugin component debugging (STT, TTS, LLM), create test example files prefixed with `test_` under the examples directory and run with `pnpm build && node ./examples/src/test_my_plugin.ts`
Applied to files:
examples/src/multi_agent.tsexamples/src/idle_user_timeout_example.ts
📚 Learning: 2026-01-16T14:33:39.551Z
Learnt from: CR
Repo: livekit/agents-js PR: 0
File: .cursor/rules/agent-core.mdc:0-0
Timestamp: 2026-01-16T14:33:39.551Z
Learning: Applies to **/*.{ts,tsx}?(test|example) : Initialize logger before using any LLM functionality with `initializeLogger({ pretty: true })` from 'livekit/agents'
Applied to files:
examples/src/basic_tool_call_agent.tsexamples/src/idle_user_timeout_example.tsexamples/src/custom_text_handler.tsexamples/src/manual_shutdown.ts
🧬 Code graph analysis (7)
examples/src/basic_agent.ts (1)
agents/src/index.ts (1)
inference(40-40)
examples/src/basic_tool_call_agent.ts (1)
agents/src/index.ts (1)
inference(40-40)
examples/src/custom_text_handler.ts (1)
agents/src/index.ts (1)
inference(40-40)
examples/src/push_to_talk.ts (1)
agents/src/index.ts (1)
inference(40-40)
examples/src/raw_function_description.ts (1)
agents/src/index.ts (1)
inference(40-40)
examples/src/manual_shutdown.ts (1)
agents/src/index.ts (1)
inference(40-40)
examples/src/anam_realtime_agent.ts (1)
agents/src/index.ts (1)
inference(40-40)
🔇 Additional comments (9)
README.md (1)
145-153: Docs update looks good.The examples now use explicit inference constructors and full model identifiers consistently.
Also applies to: 248-252
examples/src/lemonslice_realtime_avatar.ts (1)
31-35: LGTM for the STT model update.No issues spotted with the new model configuration.
examples/src/basic_tool_call_agent.ts (1)
138-143: LGTM — inference-based session wiring looks consistent.examples/src/manual_shutdown.ts (1)
62-66: LGTM — inference models are wired correctly here.examples/src/multi_agent.ts (1)
78-83: LGTM — inference session config looks consistent.examples/src/custom_text_handler.ts (1)
53-58: LGTM — inference model instances are set up cleanly.examples/src/idle_user_timeout_example.ts (1)
32-36: LGTM — inference session wiring looks good.examples/src/raw_function_description.ts (2)
57-65: LGTM — inference-based STT/TTS/LLM setup is clear.
4-13: Initialize the logger before any LLM usage.This example uses inference.LLM (line 64), but doesn't initialize the logger. Add
initializeLogger({ pretty: true })from '@livekit/agents' at the start of the entry function.Proposed fix
import { type JobContext, type JobProcess, WorkerOptions, cli, defineAgent, + initializeLogger, inference, llm, voice, } from '@livekit/agents';entry: async (ctx: JobContext) => { + initializeLogger({ pretty: true }); const vad = ctx.proc.userData.vad! as silero.VAD;
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
README.md (1)
110-160:⚠️ Potential issue | 🟠 MajorMissing
livekitimport forturnDetector.Line 157 uses
livekit.turnDetector.MultilingualModel()but the import block doesn't includelivekit. Users copy-pasting this example will encounter a runtime error.🐛 Proposed fix to add missing import
import { type JobContext, type JobProcess, WorkerOptions, cli, defineAgent, llm, voice, inference, } from '@livekit/agents'; import * as silero from '@livekit/agents-plugin-silero'; +import * as livekit from '@livekit/agents-plugin-livekit'; import { fileURLToPath } from 'node:url';
🤖 Fix all issues with AI agents
In `@examples/src/idle_user_timeout_example.ts`:
- Around line 17-20: The example fails to initialize the logger before using
LLM-related modules; add a call to initializeLogger({ pretty: true }) from
'@livekit/agents' at the top of the module before any use of inference, log, or
voice so the logger is configured first; locate the import group that includes
inference/log/voice and insert initializeLogger({ pretty: true }) immediately
after imports (or at module entry) so functions like inference.* run with a
configured logger.
🧹 Nitpick comments (4)
examples/src/multi_agent.ts (1)
4-13: Initialize the logger before LLM usage.This example uses
inference.LLMbut doesn't initialize the logger. AddinitializeLoggerto the imports and call it before the agent definition for consistent logging behavior.💡 Suggested fix
import { type JobContext, type JobProcess, WorkerOptions, cli, defineAgent, inference, + initializeLogger, llm, voice, } from '@livekit/agents'; import * as livekit from '@livekit/agents-plugin-livekit'; import * as silero from '@livekit/agents-plugin-silero'; import { fileURLToPath } from 'node:url'; import { z } from 'zod'; + +initializeLogger({ pretty: true });As per coding guidelines: "Initialize logger before using any LLM functionality with
initializeLogger({ pretty: true })from '@livekit/agents'"examples/src/basic_agent.ts (1)
4-14: Initialize the logger before LLM usage.This basic example uses
inference.LLMbut doesn't initialize the logger. As this is likely the first example new users will try, proper logging setup would improve the developer experience.💡 Suggested fix
import { type JobContext, type JobProcess, WorkerOptions, cli, defineAgent, inference, + initializeLogger, llm, metrics, voice, } from '@livekit/agents'; import * as livekit from '@livekit/agents-plugin-livekit'; import * as silero from '@livekit/agents-plugin-silero'; import { BackgroundVoiceCancellation } from '@livekit/noise-cancellation-node'; import { fileURLToPath } from 'node:url'; import { z } from 'zod'; + +initializeLogger({ pretty: true });As per coding guidelines: "Initialize logger before using any LLM functionality with
initializeLogger({ pretty: true })from '@livekit/agents'"examples/src/custom_text_handler.ts (1)
4-12: Initialize the logger before LLM usage.This example uses
inference.LLMbut doesn't initialize the logger. AddinitializeLoggerfor consistent behavior with other examples in this PR.💡 Suggested fix
import { type JobContext, type JobProcess, WorkerOptions, cli, defineAgent, inference, + initializeLogger, voice, } from '@livekit/agents'; import * as livekit from '@livekit/agents-plugin-livekit'; import * as silero from '@livekit/agents-plugin-silero'; import { BackgroundVoiceCancellation } from '@livekit/noise-cancellation-node'; import { fileURLToPath } from 'node:url'; + +initializeLogger({ pretty: true });As per coding guidelines: "Initialize logger before using any LLM functionality with
initializeLogger({ pretty: true })from '@livekit/agents'"examples/src/raw_function_description.ts (1)
4-13: Initialize the logger before LLM usage.This example uses
inference.LLMbut doesn't initialize the logger.💡 Suggested fix
import { type JobContext, type JobProcess, WorkerOptions, cli, defineAgent, inference, + initializeLogger, llm, voice, } from '@livekit/agents'; import * as livekit from '@livekit/agents-plugin-livekit'; import * as silero from '@livekit/agents-plugin-silero'; import { fileURLToPath } from 'node:url'; + +initializeLogger({ pretty: true });As per coding guidelines: "Initialize logger before using any LLM functionality with
initializeLogger({ pretty: true })from '@livekit/agents'"
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (13)
README.mdexamples/src/anam_realtime_agent.tsexamples/src/background_audio.tsexamples/src/basic_agent.tsexamples/src/basic_tool_call_agent.tsexamples/src/custom_text_handler.tsexamples/src/hedra/hedra_avatar.tsexamples/src/idle_user_timeout_example.tsexamples/src/lemonslice_realtime_avatar.tsexamples/src/manual_shutdown.tsexamples/src/multi_agent.tsexamples/src/push_to_talk.tsexamples/src/raw_function_description.ts
🚧 Files skipped from review as they are similar to previous changes (4)
- examples/src/basic_tool_call_agent.ts
- examples/src/background_audio.ts
- examples/src/hedra/hedra_avatar.ts
- examples/src/manual_shutdown.ts
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (.cursor/rules/agent-core.mdc)
Add SPDX-FileCopyrightText and SPDX-License-Identifier headers to all newly added files with '// SPDX-FileCopyrightText: 2025 LiveKit, Inc.' and '// SPDX-License-Identifier: Apache-2.0'
Files:
examples/src/lemonslice_realtime_avatar.tsexamples/src/raw_function_description.tsexamples/src/basic_agent.tsexamples/src/multi_agent.tsexamples/src/custom_text_handler.tsexamples/src/push_to_talk.tsexamples/src/anam_realtime_agent.tsexamples/src/idle_user_timeout_example.ts
**/*.{ts,tsx}?(test|example|spec)
📄 CodeRabbit inference engine (.cursor/rules/agent-core.mdc)
When testing inference LLM, always use full model names from
agents/src/inference/models.ts(e.g., 'openai/gpt-4o-mini' instead of 'gpt-4o-mini')
Files:
examples/src/lemonslice_realtime_avatar.tsexamples/src/raw_function_description.tsexamples/src/basic_agent.tsexamples/src/multi_agent.tsexamples/src/custom_text_handler.tsexamples/src/push_to_talk.tsexamples/src/anam_realtime_agent.tsexamples/src/idle_user_timeout_example.ts
**/*.{ts,tsx}?(test|example)
📄 CodeRabbit inference engine (.cursor/rules/agent-core.mdc)
Initialize logger before using any LLM functionality with
initializeLogger({ pretty: true })from '@livekit/agents'
Files:
examples/src/lemonslice_realtime_avatar.tsexamples/src/raw_function_description.tsexamples/src/basic_agent.tsexamples/src/multi_agent.tsexamples/src/custom_text_handler.tsexamples/src/push_to_talk.tsexamples/src/anam_realtime_agent.tsexamples/src/idle_user_timeout_example.ts
🧠 Learnings (6)
📓 Common learnings
Learnt from: CR
Repo: livekit/agents-js PR: 0
File: .cursor/rules/agent-core.mdc:0-0
Timestamp: 2026-01-16T14:33:39.551Z
Learning: Applies to **/*.{ts,tsx}?(test|example|spec) : When testing inference LLM, always use full model names from `agents/src/inference/models.ts` (e.g., 'openai/gpt-4o-mini' instead of 'gpt-4o-mini')
Learnt from: CR
Repo: livekit/agents-js PR: 0
File: .cursor/rules/agent-core.mdc:0-0
Timestamp: 2026-01-16T14:33:39.551Z
Learning: Applies to **/*.{ts,tsx}?(test|example) : Initialize logger before using any LLM functionality with `initializeLogger({ pretty: true })` from 'livekit/agents'
📚 Learning: 2026-01-16T14:33:39.551Z
Learnt from: CR
Repo: livekit/agents-js PR: 0
File: .cursor/rules/agent-core.mdc:0-0
Timestamp: 2026-01-16T14:33:39.551Z
Learning: Applies to **/*.{ts,tsx}?(test|example|spec) : When testing inference LLM, always use full model names from `agents/src/inference/models.ts` (e.g., 'openai/gpt-4o-mini' instead of 'gpt-4o-mini')
Applied to files:
examples/src/raw_function_description.tsexamples/src/basic_agent.tsexamples/src/multi_agent.tsexamples/src/custom_text_handler.tsexamples/src/push_to_talk.tsexamples/src/anam_realtime_agent.tsexamples/src/idle_user_timeout_example.ts
📚 Learning: 2026-01-16T14:33:39.551Z
Learnt from: CR
Repo: livekit/agents-js PR: 0
File: .cursor/rules/agent-core.mdc:0-0
Timestamp: 2026-01-16T14:33:39.551Z
Learning: Applies to examples/src/test_*.ts : For plugin component debugging (STT, TTS, LLM), create test example files prefixed with `test_` under the examples directory and run with `pnpm build && node ./examples/src/test_my_plugin.ts`
Applied to files:
examples/src/multi_agent.tsexamples/src/push_to_talk.tsexamples/src/anam_realtime_agent.ts
📚 Learning: 2026-01-16T14:33:39.551Z
Learnt from: CR
Repo: livekit/agents-js PR: 0
File: .cursor/rules/agent-core.mdc:0-0
Timestamp: 2026-01-16T14:33:39.551Z
Learning: Applies to **/*.{ts,tsx}?(test|example) : Initialize logger before using any LLM functionality with `initializeLogger({ pretty: true })` from 'livekit/agents'
Applied to files:
examples/src/custom_text_handler.tsexamples/src/push_to_talk.tsexamples/src/anam_realtime_agent.ts
📚 Learning: 2026-01-16T14:33:39.551Z
Learnt from: CR
Repo: livekit/agents-js PR: 0
File: .cursor/rules/agent-core.mdc:0-0
Timestamp: 2026-01-16T14:33:39.551Z
Learning: Use `pnpm build && pnpm dlx tsx ./examples/src/my_agent.ts dev|download-files --log-level=debug|info(default)` to run example agents from the examples directory
Applied to files:
examples/src/push_to_talk.tsexamples/src/anam_realtime_agent.ts
📚 Learning: 2026-01-16T14:33:39.551Z
Learnt from: CR
Repo: livekit/agents-js PR: 0
File: .cursor/rules/agent-core.mdc:0-0
Timestamp: 2026-01-16T14:33:39.551Z
Learning: Applies to **/{examples,test}/**/*.test.ts : Include both basic streaming and tool calling tests to verify full LLM functionality
Applied to files:
examples/src/push_to_talk.tsexamples/src/anam_realtime_agent.ts
🧬 Code graph analysis (5)
examples/src/raw_function_description.ts (1)
agents/src/index.ts (1)
inference(40-40)
examples/src/basic_agent.ts (1)
agents/src/index.ts (1)
inference(40-40)
examples/src/multi_agent.ts (1)
agents/src/index.ts (1)
inference(40-40)
examples/src/custom_text_handler.ts (1)
agents/src/index.ts (1)
inference(40-40)
examples/src/idle_user_timeout_example.ts (1)
agents/src/index.ts (1)
inference(40-40)
🔇 Additional comments (10)
examples/src/lemonslice_realtime_avatar.ts (1)
32-34: LGTM!The STT model update to
deepgram/nova-3aligns with the PR objective to standardize on Deepgram. Logger is properly initialized and full model names are used throughout.examples/src/multi_agent.ts (1)
80-85: LGTM on the inference-based model instantiation.The migration to
inference.STT,inference.TTS, andinference.LLMwith full model names (deepgram/nova-3,cartesia/sonic-3,openai/gpt-4.1-mini) is correctly implemented.examples/src/push_to_talk.ts (1)
32-41: LGTM!Logger initialization and inference-based model instantiation are correctly implemented. Full model names are used throughout.
examples/src/basic_agent.ts (1)
46-57: LGTM on the inference-based model instantiation.The migration to inference-based STT/LLM/TTS with full model names is correctly implemented. The inline comments pointing to documentation are helpful for users.
examples/src/custom_text_handler.ts (1)
55-60: LGTM on the inference-based model instantiation.The migration to inference-based STT/LLM/TTS with full model names is correctly implemented.
examples/src/raw_function_description.ts (1)
59-67: LGTM on the inference-based model instantiation.The migration to inference-based STT/TTS/LLM with full model names is correctly implemented.
examples/src/anam_realtime_agent.ts (1)
27-39: LGTM!Logger initialization and inference-based STT/TTS instantiation are correctly implemented. The configuration works well alongside the OpenAI Realtime model for the LLM.
examples/src/idle_user_timeout_example.ts (1)
34-39: LGTM!The migration to inference-based components looks correct. Model names follow the full naming convention (e.g.,
'openai/gpt-4.1-mini','deepgram/nova-3','cartesia/sonic-3') as required by the coding guidelines.README.md (2)
147-153: LGTM!The updated inference-based components with full model names (
'deepgram/nova-3','openai/gpt-4.1-mini','cartesia/sonic-3') align well with the PR objective to make Deepgram/gateway the defaults.
250-252: LGTM!The multi-agent example is consistently updated to use inference-based components with full model names.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
|
Hey @bcherry, feel free to merge it whenever you feel ready on this PR |
aligned with changes in docs and python sdk
Summary by CodeRabbit
Refactor
Chores