@livekit/agents-plugin-openai 1.9.2 → 1.9.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/dist/index.cjs +1 -1
  2. package/dist/index.js +1 -1
  3. package/dist/models.cjs.map +1 -1
  4. package/dist/models.d.cts +1 -0
  5. package/dist/models.d.ts +1 -0
  6. package/dist/models.d.ts.map +1 -1
  7. package/dist/models.js.map +1 -1
  8. package/dist/realtime/api_proto.cjs +3 -21
  9. package/dist/realtime/api_proto.cjs.map +1 -1
  10. package/dist/realtime/api_proto.d.cts +1 -504
  11. package/dist/realtime/api_proto.d.ts +1 -504
  12. package/dist/realtime/api_proto.d.ts.map +1 -1
  13. package/dist/realtime/api_proto.js +1 -12
  14. package/dist/realtime/api_proto.js.map +1 -1
  15. package/dist/realtime/gpt_live_model.cjs +7 -851
  16. package/dist/realtime/gpt_live_model.cjs.map +1 -1
  17. package/dist/realtime/gpt_live_model.d.cts +6 -178
  18. package/dist/realtime/gpt_live_model.d.ts +6 -178
  19. package/dist/realtime/gpt_live_model.d.ts.map +1 -1
  20. package/dist/realtime/gpt_live_model.js +7 -850
  21. package/dist/realtime/gpt_live_model.js.map +1 -1
  22. package/dist/realtime/gpt_live_model.test.cjs +32 -1
  23. package/dist/realtime/gpt_live_model.test.cjs.map +1 -1
  24. package/dist/realtime/gpt_live_model.test.js +32 -1
  25. package/dist/realtime/gpt_live_model.test.js.map +1 -1
  26. package/dist/realtime/gpt_live_types.cjs +6 -0
  27. package/dist/realtime/gpt_live_types.cjs.map +1 -1
  28. package/dist/realtime/gpt_live_types.d.cts +1 -169
  29. package/dist/realtime/gpt_live_types.d.ts +1 -169
  30. package/dist/realtime/gpt_live_types.d.ts.map +1 -1
  31. package/dist/realtime/gpt_live_types.js +1 -0
  32. package/dist/realtime/gpt_live_types.js.map +1 -1
  33. package/dist/realtime/index.cjs +8 -1
  34. package/dist/realtime/index.cjs.map +1 -1
  35. package/dist/realtime/index.d.cts +5 -0
  36. package/dist/realtime/index.d.ts +5 -0
  37. package/dist/realtime/index.d.ts.map +1 -1
  38. package/dist/realtime/index.js +6 -1
  39. package/dist/realtime/index.js.map +1 -1
  40. package/dist/realtime/realtime_model.cjs +3 -1890
  41. package/dist/realtime/realtime_model.cjs.map +1 -1
  42. package/dist/realtime/realtime_model.d.cts +1 -236
  43. package/dist/realtime/realtime_model.d.ts +1 -236
  44. package/dist/realtime/realtime_model.d.ts.map +1 -1
  45. package/dist/realtime/realtime_model.js +1 -1886
  46. package/dist/realtime/realtime_model.js.map +1 -1
  47. package/dist/realtime/realtime_model.test.cjs +11 -1141
  48. package/dist/realtime/realtime_model.test.cjs.map +1 -1
  49. package/dist/realtime/realtime_model.test.js +16 -1147
  50. package/dist/realtime/realtime_model.test.js.map +1 -1
  51. package/dist/tool_utils.test.cjs +3 -1
  52. package/dist/tool_utils.test.cjs.map +1 -1
  53. package/dist/tool_utils.test.js +3 -1
  54. package/dist/tool_utils.test.js.map +1 -1
  55. package/package.json +5 -6
  56. package/src/models.ts +2 -0
  57. package/src/realtime/api_proto.ts +2 -715
  58. package/src/realtime/gpt_live_model.test.ts +42 -1
  59. package/src/realtime/gpt_live_model.ts +17 -1030
  60. package/src/realtime/gpt_live_types.ts +1 -136
  61. package/src/realtime/index.ts +7 -0
  62. package/src/realtime/realtime_model.test.ts +17 -1454
  63. package/src/realtime/realtime_model.ts +2 -2408
  64. package/src/tool_utils.test.ts +3 -1
package/dist/index.cjs CHANGED
@@ -52,7 +52,7 @@ class OpenAIPlugin extends import_agents.Plugin {
52
52
  constructor() {
53
53
  super({
54
54
  title: "openai",
55
- version: "1.9.2",
55
+ version: "1.9.4",
56
56
  package: "@livekit/agents-plugin-openai"
57
57
  });
58
58
  }
package/dist/index.js CHANGED
@@ -11,7 +11,7 @@ class OpenAIPlugin extends Plugin {
11
11
  constructor() {
12
12
  super({
13
13
  title: "openai",
14
- version: "1.9.2",
14
+ version: "1.9.4",
15
15
  package: "@livekit/agents-plugin-openai"
16
16
  });
17
17
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/models.ts"],"sourcesContent":["// SPDX-FileCopyrightText: 2024 LiveKit, Inc.\n//\n// SPDX-License-Identifier: Apache-2.0\n\nexport type ChatModels =\n | 'gpt-5.6-luna'\n | 'gpt-5.6-sol'\n | 'gpt-5.6-terra'\n | 'gpt-5.5'\n | 'gpt-5.4'\n | 'gpt-5.4-mini'\n | 'gpt-5.3-chat-latest'\n | 'gpt-5.2'\n | 'gpt-5.2-chat-latest'\n | 'gpt-5.1'\n | 'gpt-5.1-chat-latest'\n | 'gpt-5'\n | 'gpt-5-mini'\n | 'gpt-5-nano'\n | 'gpt-4.1'\n | 'gpt-4.1-mini'\n | 'gpt-4.1-nano'\n | 'gpt-4o'\n | 'gpt-4o-2024-05-13'\n | 'gpt-4o-mini'\n | 'gpt-4o-mini-2024-07-18'\n | 'gpt-4-turbo'\n | 'gpt-4-turbo-2024-04-09'\n | 'gpt-4-turbo-preview'\n | 'gpt-4-0125-preview'\n | 'gpt-4-1106-preview'\n | 'gpt-4-vision-preview'\n | 'gpt-4-1106-vision-preview'\n | 'gpt-4'\n | 'gpt-4-0314'\n | 'gpt-4-0613'\n | 'gpt-4-32k'\n | 'gpt-4-32k-0314'\n | 'gpt-4-32k-0613'\n | 'gpt-3.5-turbo'\n | 'gpt-3.5-turbo-16k'\n | 'gpt-3.5-turbo-0301'\n | 'gpt-3.5-turbo-0613'\n | 'gpt-3.5-turbo-1106'\n | 'gpt-3.5-turbo-16k-0613';\n\nexport type WhisperModels = 'whisper-1';\n\nexport type STTModels =\n | WhisperModels\n | 'gpt-transcribe'\n | 'gpt-4o-transcribe'\n | 'gpt-4o-mini-transcribe'\n | 'gpt-live-transcribe'\n | 'gpt-realtime-whisper';\n\nexport type TTSModels = 'tts-1' | 'tts-1-hd' | 'gpt-4o-mini-tts';\n\nexport type TTSVoices =\n | 'alloy'\n | 'ash'\n | 'ballad'\n | 'coral'\n | 'echo'\n | 'fable'\n | 'nova'\n | 'onyx'\n | 'sage'\n | 'shimmer';\n\nexport type DalleModels = 'dall-e-2' | 'dall-e-3';\n\nexport type EmbeddingModels =\n | 'text-embedding-ada-002'\n | 'text-embedding-3-small'\n | 'text-embedding-3-large';\n\nexport type AssistantTools = 'code_interpreter' | 'file_search' | 'function';\n\nexport type VertexModels =\n | 'google/gemini-2.0-flash-exp'\n | 'google/gemini-1.5-flash'\n | 'google/gemini-1.5-pro'\n | 'google/gemini-1.0-pro-vision'\n | 'google/gemini-1.0-pro-vision-001'\n | 'google/gemini-1.0-pro-002'\n | 'google/gemini-1.0-pro-001'\n | 'google/gemini-1.0-pro';\n\n// adapters for OpenAI-compatible LLMs, TTSs, STTs\n\nexport type TelnyxChatModels =\n | 'meta-llama/Meta-Llama-3.1-8B-Instruct'\n | 'meta-llama/Meta-Llama-3.1-70B-Instruct';\n\nexport type CerebrasChatModels = 'gpt-oss-120b' | 'qwen-3.8-27b' | 'zai-glm-4.7' | 'gemma-4-31b';\n\nexport type PerplexityChatModels =\n | 'llama-3.1-sonar-small-128k-online'\n | 'llama-3.1-sonar-small-128k-chat'\n | 'llama-3.1-sonar-large-128k-online'\n | 'llama-3.1-sonar-large-128k-chat'\n | 'llama-3.1-8b-instruct'\n | 'llama-3.1-70b-instruct';\n\nexport type GroqChatModels =\n | 'llama-3.1-8b-instant'\n | 'llama-3.3-70b-versatile'\n | 'openai/gpt-oss-120b'\n | 'openai/gpt-oss-20b';\n\nexport type GroqAudioModels = 'whisper-large-v3' | 'whisper-large-v3-turbo';\n\nexport type DeepSeekChatModels = 'deepseek-coder' | 'deepseek-chat';\n\nexport type TogetherChatModels =\n | 'Austism/chronos-hermes-13b'\n | 'Gryphe/MythoMax-L2-13b'\n | 'NousResearch/Nous-Capybara-7B-V1p9'\n | 'NousResearch/Nous-Hermes-2-Mistral-7B-DPO'\n | 'NousResearch/Nous-Hermes-2-Mixtral-8x7B-DPO'\n | 'NousResearch/Nous-Hermes-2-Mixtral-8x7B-SFT'\n | 'NousResearch/Nous-Hermes-2-Yi-34B'\n | 'NousResearch/Nous-Hermes-Llama2-13b'\n | 'NousResearch/Nous-Hermes-llama-2-7b'\n | 'Open-Orca/Mistral-7B-OpenOrca'\n | 'Qwen/Qwen1.5-0.5B-Chat'\n | 'Qwen/Qwen1.5-1.8B-Chat'\n | 'Qwen/Qwen1.5-110B-Chat'\n | 'Qwen/Qwen1.5-14B-Chat'\n | 'Qwen/Qwen1.5-32B-Chat'\n | 'Qwen/Qwen1.5-4B-Chat'\n | 'Qwen/Qwen1.5-72B-Chat'\n | 'Qwen/Qwen1.5-7B-Chat'\n | 'Qwen/Qwen2-72B-Instruct'\n | 'Snowflake/snowflake-arctic-instruct'\n | 'Undi95/ReMM-SLERP-L2-13B'\n | 'Undi95/Toppy-M-7B'\n | 'WizardLM/WizardLM-13B-V1.2'\n | 'allenai/OLMo-7B'\n | 'allenai/OLMo-7B-Instruct'\n | 'allenai/OLMo-7B-Twin-2T'\n | 'codellama/CodeLlama-13b-Instruct-hf'\n | 'codellama/CodeLlama-34b-Instruct-hf'\n | 'codellama/CodeLlama-70b-Instruct-hf'\n | 'codellama/CodeLlama-7b-Instruct-hf'\n | 'cognitivecomputations/dolphin-2.5-mixtral-8x7b'\n | 'databricks/dbrx-instruct'\n | 'deepseek-ai/deepseek-coder-33b-instruct'\n | 'deepseek-ai/deepseek-llm-67b-chat'\n | 'garage-bAInd/Platypus2-70B-instruct'\n | 'google/gemma-2-27b-it'\n | 'google/gemma-2-9b-it'\n | 'google/gemma-2b-it'\n | 'google/gemma-7b-it'\n | 'lmsys/vicuna-13b-v1.5'\n | 'lmsys/vicuna-7b-v1.5'\n | 'meta-llama/Llama-2-13b-chat-hf'\n | 'meta-llama/Llama-2-70b-chat-hf'\n | 'meta-llama/Llama-2-7b-chat-hf'\n | 'meta-llama/Llama-3-70b-chat-hf'\n | 'meta-llama/Llama-3-8b-chat-hf'\n | 'meta-llama/Meta-Llama-3-70B-Instruct-Lite'\n | 'meta-llama/Meta-Llama-3-70B-Instruct-Turbo'\n | 'meta-llama/Meta-Llama-3-8B-Instruct-Lite'\n | 'meta-llama/Meta-Llama-3-8B-Instruct-Turbo'\n | 'meta-llama/Meta-Llama-3.1-405B-Instruct-Turbo'\n | 'meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo'\n | 'meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo'\n | 'meta-llama/Llama-3.3-70B-Instruct-Turbo'\n | 'mistralai/Mistral-7B-Instruct-v0.1'\n | 'mistralai/Mistral-7B-Instruct-v0.2'\n | 'mistralai/Mistral-7B-Instruct-v0.3'\n | 'mistralai/Mixtral-8x22B-Instruct-v0.1'\n | 'mistralai/Mixtral-8x7B-Instruct-v0.1'\n | 'openchat/openchat-3.5-1210'\n | 'snorkelai/Snorkel-Mistral-PairRM-DPO'\n | 'teknium/OpenHermes-2-Mistral-7B'\n | 'teknium/OpenHermes-2p5-Mistral-7B'\n | 'togethercomputer/Llama-2-7B-32K-Instruct'\n | 'togethercomputer/RedPajama-INCITE-7B-Chat'\n | 'togethercomputer/RedPajama-INCITE-Chat-3B-v1'\n | 'togethercomputer/StripedHyena-Nous-7B'\n | 'togethercomputer/alpaca-7b'\n | 'upstage/SOLAR-10.7B-Instruct-v1.0'\n | 'zero-one-ai/Yi-34B-Chat';\n\nexport type OctoChatModels =\n | 'meta-llama-3-70b-instruct'\n | 'meta-llama-3.1-405b-instruct'\n | 'meta-llama-3.1-70b-instruct'\n | 'meta-llama-3.1-8b-instruct'\n | 'mistral-7b-instruct'\n | 'mixtral-8x7b-instruct'\n | 'wizardlm-2-8x22bllamaguard-2-7b';\n\nexport type XAIChatModels =\n | 'grok-3'\n | 'grok-3-fast'\n | 'grok-3-mini'\n | 'grok-3-mini-fast'\n | 'grok-2-vision-1212'\n | 'grok-2-image-1212'\n | 'grok-2-1212';\n\nexport type MetaChatModels =\n | 'Llama-4-Scout-17B-16E-Instruct-FP8'\n | 'Llama-4-Maverick-17B-128E-Instruct-FP8'\n | 'Llama-3.3-70B-Instruct'\n | 'Llama-3.3-8B-Instruct';\n\nexport type ReasoningEffort = 'none' | 'minimal' | 'low' | 'medium' | 'high';\n\nexport type Reasoning = { effort?: ReasoningEffort | null; [key: string]: unknown };\n\nexport function supportsReasoningEffort(model: ChatModels | string): boolean {\n return [\n 'gpt-5.6-luna',\n 'gpt-5.6-sol',\n 'gpt-5.6-terra',\n 'gpt-5.5',\n 'gpt-5.4',\n 'gpt-5.4-mini',\n 'gpt-5.2',\n 'gpt-5.1',\n 'gpt-5',\n 'gpt-5-mini',\n 'gpt-5-nano',\n ].includes(model);\n}\n\nexport function defaultReasoningEffort(model: ChatModels | string): ReasoningEffort | undefined {\n if (!supportsReasoningEffort(model)) {\n return undefined;\n }\n\n if (\n [\n 'gpt-5.1',\n 'gpt-5.2',\n 'gpt-5.4',\n 'gpt-5.4-mini',\n 'gpt-5.5',\n 'gpt-5.6-luna',\n 'gpt-5.6-sol',\n 'gpt-5.6-terra',\n ].includes(model)\n ) {\n return 'none';\n }\n\n return 'minimal';\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAuNO,SAAS,wBAAwB,OAAqC;AAC3E,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,EAAE,SAAS,KAAK;AAClB;AAEO,SAAS,uBAAuB,OAAyD;AAC9F,MAAI,CAAC,wBAAwB,KAAK,GAAG;AACnC,WAAO;AAAA,EACT;AAEA,MACE;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,EAAE,SAAS,KAAK,GAChB;AACA,WAAO;AAAA,EACT;AAEA,SAAO;AACT;","names":[]}
1
+ {"version":3,"sources":["../src/models.ts"],"sourcesContent":["// SPDX-FileCopyrightText: 2024 LiveKit, Inc.\n//\n// SPDX-License-Identifier: Apache-2.0\n\nexport type { RealtimeModels } from '@livekit/agents/llm/openai_realtime/api_proto';\n\nexport type ChatModels =\n | 'gpt-5.6-luna'\n | 'gpt-5.6-sol'\n | 'gpt-5.6-terra'\n | 'gpt-5.5'\n | 'gpt-5.4'\n | 'gpt-5.4-mini'\n | 'gpt-5.3-chat-latest'\n | 'gpt-5.2'\n | 'gpt-5.2-chat-latest'\n | 'gpt-5.1'\n | 'gpt-5.1-chat-latest'\n | 'gpt-5'\n | 'gpt-5-mini'\n | 'gpt-5-nano'\n | 'gpt-4.1'\n | 'gpt-4.1-mini'\n | 'gpt-4.1-nano'\n | 'gpt-4o'\n | 'gpt-4o-2024-05-13'\n | 'gpt-4o-mini'\n | 'gpt-4o-mini-2024-07-18'\n | 'gpt-4-turbo'\n | 'gpt-4-turbo-2024-04-09'\n | 'gpt-4-turbo-preview'\n | 'gpt-4-0125-preview'\n | 'gpt-4-1106-preview'\n | 'gpt-4-vision-preview'\n | 'gpt-4-1106-vision-preview'\n | 'gpt-4'\n | 'gpt-4-0314'\n | 'gpt-4-0613'\n | 'gpt-4-32k'\n | 'gpt-4-32k-0314'\n | 'gpt-4-32k-0613'\n | 'gpt-3.5-turbo'\n | 'gpt-3.5-turbo-16k'\n | 'gpt-3.5-turbo-0301'\n | 'gpt-3.5-turbo-0613'\n | 'gpt-3.5-turbo-1106'\n | 'gpt-3.5-turbo-16k-0613';\n\nexport type WhisperModels = 'whisper-1';\n\nexport type STTModels =\n | WhisperModels\n | 'gpt-transcribe'\n | 'gpt-4o-transcribe'\n | 'gpt-4o-mini-transcribe'\n | 'gpt-live-transcribe'\n | 'gpt-realtime-whisper';\n\nexport type TTSModels = 'tts-1' | 'tts-1-hd' | 'gpt-4o-mini-tts';\n\nexport type TTSVoices =\n | 'alloy'\n | 'ash'\n | 'ballad'\n | 'coral'\n | 'echo'\n | 'fable'\n | 'nova'\n | 'onyx'\n | 'sage'\n | 'shimmer';\n\nexport type DalleModels = 'dall-e-2' | 'dall-e-3';\n\nexport type EmbeddingModels =\n | 'text-embedding-ada-002'\n | 'text-embedding-3-small'\n | 'text-embedding-3-large';\n\nexport type AssistantTools = 'code_interpreter' | 'file_search' | 'function';\n\nexport type VertexModels =\n | 'google/gemini-2.0-flash-exp'\n | 'google/gemini-1.5-flash'\n | 'google/gemini-1.5-pro'\n | 'google/gemini-1.0-pro-vision'\n | 'google/gemini-1.0-pro-vision-001'\n | 'google/gemini-1.0-pro-002'\n | 'google/gemini-1.0-pro-001'\n | 'google/gemini-1.0-pro';\n\n// adapters for OpenAI-compatible LLMs, TTSs, STTs\n\nexport type TelnyxChatModels =\n | 'meta-llama/Meta-Llama-3.1-8B-Instruct'\n | 'meta-llama/Meta-Llama-3.1-70B-Instruct';\n\nexport type CerebrasChatModels = 'gpt-oss-120b' | 'qwen-3.8-27b' | 'zai-glm-4.7' | 'gemma-4-31b';\n\nexport type PerplexityChatModels =\n | 'llama-3.1-sonar-small-128k-online'\n | 'llama-3.1-sonar-small-128k-chat'\n | 'llama-3.1-sonar-large-128k-online'\n | 'llama-3.1-sonar-large-128k-chat'\n | 'llama-3.1-8b-instruct'\n | 'llama-3.1-70b-instruct';\n\nexport type GroqChatModels =\n | 'llama-3.1-8b-instant'\n | 'llama-3.3-70b-versatile'\n | 'openai/gpt-oss-120b'\n | 'openai/gpt-oss-20b';\n\nexport type GroqAudioModels = 'whisper-large-v3' | 'whisper-large-v3-turbo';\n\nexport type DeepSeekChatModels = 'deepseek-coder' | 'deepseek-chat';\n\nexport type TogetherChatModels =\n | 'Austism/chronos-hermes-13b'\n | 'Gryphe/MythoMax-L2-13b'\n | 'NousResearch/Nous-Capybara-7B-V1p9'\n | 'NousResearch/Nous-Hermes-2-Mistral-7B-DPO'\n | 'NousResearch/Nous-Hermes-2-Mixtral-8x7B-DPO'\n | 'NousResearch/Nous-Hermes-2-Mixtral-8x7B-SFT'\n | 'NousResearch/Nous-Hermes-2-Yi-34B'\n | 'NousResearch/Nous-Hermes-Llama2-13b'\n | 'NousResearch/Nous-Hermes-llama-2-7b'\n | 'Open-Orca/Mistral-7B-OpenOrca'\n | 'Qwen/Qwen1.5-0.5B-Chat'\n | 'Qwen/Qwen1.5-1.8B-Chat'\n | 'Qwen/Qwen1.5-110B-Chat'\n | 'Qwen/Qwen1.5-14B-Chat'\n | 'Qwen/Qwen1.5-32B-Chat'\n | 'Qwen/Qwen1.5-4B-Chat'\n | 'Qwen/Qwen1.5-72B-Chat'\n | 'Qwen/Qwen1.5-7B-Chat'\n | 'Qwen/Qwen2-72B-Instruct'\n | 'Snowflake/snowflake-arctic-instruct'\n | 'Undi95/ReMM-SLERP-L2-13B'\n | 'Undi95/Toppy-M-7B'\n | 'WizardLM/WizardLM-13B-V1.2'\n | 'allenai/OLMo-7B'\n | 'allenai/OLMo-7B-Instruct'\n | 'allenai/OLMo-7B-Twin-2T'\n | 'codellama/CodeLlama-13b-Instruct-hf'\n | 'codellama/CodeLlama-34b-Instruct-hf'\n | 'codellama/CodeLlama-70b-Instruct-hf'\n | 'codellama/CodeLlama-7b-Instruct-hf'\n | 'cognitivecomputations/dolphin-2.5-mixtral-8x7b'\n | 'databricks/dbrx-instruct'\n | 'deepseek-ai/deepseek-coder-33b-instruct'\n | 'deepseek-ai/deepseek-llm-67b-chat'\n | 'garage-bAInd/Platypus2-70B-instruct'\n | 'google/gemma-2-27b-it'\n | 'google/gemma-2-9b-it'\n | 'google/gemma-2b-it'\n | 'google/gemma-7b-it'\n | 'lmsys/vicuna-13b-v1.5'\n | 'lmsys/vicuna-7b-v1.5'\n | 'meta-llama/Llama-2-13b-chat-hf'\n | 'meta-llama/Llama-2-70b-chat-hf'\n | 'meta-llama/Llama-2-7b-chat-hf'\n | 'meta-llama/Llama-3-70b-chat-hf'\n | 'meta-llama/Llama-3-8b-chat-hf'\n | 'meta-llama/Meta-Llama-3-70B-Instruct-Lite'\n | 'meta-llama/Meta-Llama-3-70B-Instruct-Turbo'\n | 'meta-llama/Meta-Llama-3-8B-Instruct-Lite'\n | 'meta-llama/Meta-Llama-3-8B-Instruct-Turbo'\n | 'meta-llama/Meta-Llama-3.1-405B-Instruct-Turbo'\n | 'meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo'\n | 'meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo'\n | 'meta-llama/Llama-3.3-70B-Instruct-Turbo'\n | 'mistralai/Mistral-7B-Instruct-v0.1'\n | 'mistralai/Mistral-7B-Instruct-v0.2'\n | 'mistralai/Mistral-7B-Instruct-v0.3'\n | 'mistralai/Mixtral-8x22B-Instruct-v0.1'\n | 'mistralai/Mixtral-8x7B-Instruct-v0.1'\n | 'openchat/openchat-3.5-1210'\n | 'snorkelai/Snorkel-Mistral-PairRM-DPO'\n | 'teknium/OpenHermes-2-Mistral-7B'\n | 'teknium/OpenHermes-2p5-Mistral-7B'\n | 'togethercomputer/Llama-2-7B-32K-Instruct'\n | 'togethercomputer/RedPajama-INCITE-7B-Chat'\n | 'togethercomputer/RedPajama-INCITE-Chat-3B-v1'\n | 'togethercomputer/StripedHyena-Nous-7B'\n | 'togethercomputer/alpaca-7b'\n | 'upstage/SOLAR-10.7B-Instruct-v1.0'\n | 'zero-one-ai/Yi-34B-Chat';\n\nexport type OctoChatModels =\n | 'meta-llama-3-70b-instruct'\n | 'meta-llama-3.1-405b-instruct'\n | 'meta-llama-3.1-70b-instruct'\n | 'meta-llama-3.1-8b-instruct'\n | 'mistral-7b-instruct'\n | 'mixtral-8x7b-instruct'\n | 'wizardlm-2-8x22bllamaguard-2-7b';\n\nexport type XAIChatModels =\n | 'grok-3'\n | 'grok-3-fast'\n | 'grok-3-mini'\n | 'grok-3-mini-fast'\n | 'grok-2-vision-1212'\n | 'grok-2-image-1212'\n | 'grok-2-1212';\n\nexport type MetaChatModels =\n | 'Llama-4-Scout-17B-16E-Instruct-FP8'\n | 'Llama-4-Maverick-17B-128E-Instruct-FP8'\n | 'Llama-3.3-70B-Instruct'\n | 'Llama-3.3-8B-Instruct';\n\nexport type ReasoningEffort = 'none' | 'minimal' | 'low' | 'medium' | 'high';\n\nexport type Reasoning = { effort?: ReasoningEffort | null; [key: string]: unknown };\n\nexport function supportsReasoningEffort(model: ChatModels | string): boolean {\n return [\n 'gpt-5.6-luna',\n 'gpt-5.6-sol',\n 'gpt-5.6-terra',\n 'gpt-5.5',\n 'gpt-5.4',\n 'gpt-5.4-mini',\n 'gpt-5.2',\n 'gpt-5.1',\n 'gpt-5',\n 'gpt-5-mini',\n 'gpt-5-nano',\n ].includes(model);\n}\n\nexport function defaultReasoningEffort(model: ChatModels | string): ReasoningEffort | undefined {\n if (!supportsReasoningEffort(model)) {\n return undefined;\n }\n\n if (\n [\n 'gpt-5.1',\n 'gpt-5.2',\n 'gpt-5.4',\n 'gpt-5.4-mini',\n 'gpt-5.5',\n 'gpt-5.6-luna',\n 'gpt-5.6-sol',\n 'gpt-5.6-terra',\n ].includes(model)\n ) {\n return 'none';\n }\n\n return 'minimal';\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAyNO,SAAS,wBAAwB,OAAqC;AAC3E,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,EAAE,SAAS,KAAK;AAClB;AAEO,SAAS,uBAAuB,OAAyD;AAC9F,MAAI,CAAC,wBAAwB,KAAK,GAAG;AACnC,WAAO;AAAA,EACT;AAEA,MACE;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,EAAE,SAAS,KAAK,GAChB;AACA,WAAO;AAAA,EACT;AAEA,SAAO;AACT;","names":[]}
package/dist/models.d.cts CHANGED
@@ -1,3 +1,4 @@
1
+ export type { RealtimeModels } from '@livekit/agents/llm/openai_realtime/api_proto';
1
2
  export type ChatModels = 'gpt-5.6-luna' | 'gpt-5.6-sol' | 'gpt-5.6-terra' | 'gpt-5.5' | 'gpt-5.4' | 'gpt-5.4-mini' | 'gpt-5.3-chat-latest' | 'gpt-5.2' | 'gpt-5.2-chat-latest' | 'gpt-5.1' | 'gpt-5.1-chat-latest' | 'gpt-5' | 'gpt-5-mini' | 'gpt-5-nano' | 'gpt-4.1' | 'gpt-4.1-mini' | 'gpt-4.1-nano' | 'gpt-4o' | 'gpt-4o-2024-05-13' | 'gpt-4o-mini' | 'gpt-4o-mini-2024-07-18' | 'gpt-4-turbo' | 'gpt-4-turbo-2024-04-09' | 'gpt-4-turbo-preview' | 'gpt-4-0125-preview' | 'gpt-4-1106-preview' | 'gpt-4-vision-preview' | 'gpt-4-1106-vision-preview' | 'gpt-4' | 'gpt-4-0314' | 'gpt-4-0613' | 'gpt-4-32k' | 'gpt-4-32k-0314' | 'gpt-4-32k-0613' | 'gpt-3.5-turbo' | 'gpt-3.5-turbo-16k' | 'gpt-3.5-turbo-0301' | 'gpt-3.5-turbo-0613' | 'gpt-3.5-turbo-1106' | 'gpt-3.5-turbo-16k-0613';
2
3
  export type WhisperModels = 'whisper-1';
3
4
  export type STTModels = WhisperModels | 'gpt-transcribe' | 'gpt-4o-transcribe' | 'gpt-4o-mini-transcribe' | 'gpt-live-transcribe' | 'gpt-realtime-whisper';
package/dist/models.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ export type { RealtimeModels } from '@livekit/agents/llm/openai_realtime/api_proto';
1
2
  export type ChatModels = 'gpt-5.6-luna' | 'gpt-5.6-sol' | 'gpt-5.6-terra' | 'gpt-5.5' | 'gpt-5.4' | 'gpt-5.4-mini' | 'gpt-5.3-chat-latest' | 'gpt-5.2' | 'gpt-5.2-chat-latest' | 'gpt-5.1' | 'gpt-5.1-chat-latest' | 'gpt-5' | 'gpt-5-mini' | 'gpt-5-nano' | 'gpt-4.1' | 'gpt-4.1-mini' | 'gpt-4.1-nano' | 'gpt-4o' | 'gpt-4o-2024-05-13' | 'gpt-4o-mini' | 'gpt-4o-mini-2024-07-18' | 'gpt-4-turbo' | 'gpt-4-turbo-2024-04-09' | 'gpt-4-turbo-preview' | 'gpt-4-0125-preview' | 'gpt-4-1106-preview' | 'gpt-4-vision-preview' | 'gpt-4-1106-vision-preview' | 'gpt-4' | 'gpt-4-0314' | 'gpt-4-0613' | 'gpt-4-32k' | 'gpt-4-32k-0314' | 'gpt-4-32k-0613' | 'gpt-3.5-turbo' | 'gpt-3.5-turbo-16k' | 'gpt-3.5-turbo-0301' | 'gpt-3.5-turbo-0613' | 'gpt-3.5-turbo-1106' | 'gpt-3.5-turbo-16k-0613';
2
3
  export type WhisperModels = 'whisper-1';
3
4
  export type STTModels = WhisperModels | 'gpt-transcribe' | 'gpt-4o-transcribe' | 'gpt-4o-mini-transcribe' | 'gpt-live-transcribe' | 'gpt-realtime-whisper';
@@ -1 +1 @@
1
- {"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../src/models.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,UAAU,GAClB,cAAc,GACd,aAAa,GACb,eAAe,GACf,SAAS,GACT,SAAS,GACT,cAAc,GACd,qBAAqB,GACrB,SAAS,GACT,qBAAqB,GACrB,SAAS,GACT,qBAAqB,GACrB,OAAO,GACP,YAAY,GACZ,YAAY,GACZ,SAAS,GACT,cAAc,GACd,cAAc,GACd,QAAQ,GACR,mBAAmB,GACnB,aAAa,GACb,wBAAwB,GACxB,aAAa,GACb,wBAAwB,GACxB,qBAAqB,GACrB,oBAAoB,GACpB,oBAAoB,GACpB,sBAAsB,GACtB,2BAA2B,GAC3B,OAAO,GACP,YAAY,GACZ,YAAY,GACZ,WAAW,GACX,gBAAgB,GAChB,gBAAgB,GAChB,eAAe,GACf,mBAAmB,GACnB,oBAAoB,GACpB,oBAAoB,GACpB,oBAAoB,GACpB,wBAAwB,CAAC;AAE7B,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AmB,GACnB,aAAa,CAAC;AAElB,MAAM,MAAM,cAAc,GACtB,oCAAoC,GACpC,wCAAwC,GACxC,wBAAwB,GACxB,uBAAuB,CAAC;AAE5B,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,SAAS,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAC;AAE7E,MAAM,MAAM,SAAS,GAAG;IAAE,MAAM,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IAAC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,CAAC;AAEpF,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,GAAG,OAAO,CAc3E;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,GAAG,eAAe,GAAG,SAAS,CAqB9F"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/models.ts"],"sourcesContent":["// SPDX-FileCopyrightText: 2024 LiveKit, Inc.\n//\n// SPDX-License-Identifier: Apache-2.0\n\nexport type ChatModels =\n | 'gpt-5.6-luna'\n | 'gpt-5.6-sol'\n | 'gpt-5.6-terra'\n | 'gpt-5.5'\n | 'gpt-5.4'\n | 'gpt-5.4-mini'\n | 'gpt-5.3-chat-latest'\n | 'gpt-5.2'\n | 'gpt-5.2-chat-latest'\n | 'gpt-5.1'\n | 'gpt-5.1-chat-latest'\n | 'gpt-5'\n | 'gpt-5-mini'\n | 'gpt-5-nano'\n | 'gpt-4.1'\n | 'gpt-4.1-mini'\n | 'gpt-4.1-nano'\n | 'gpt-4o'\n | 'gpt-4o-2024-05-13'\n | 'gpt-4o-mini'\n | 'gpt-4o-mini-2024-07-18'\n | 'gpt-4-turbo'\n | 'gpt-4-turbo-2024-04-09'\n | 'gpt-4-turbo-preview'\n | 'gpt-4-0125-preview'\n | 'gpt-4-1106-preview'\n | 'gpt-4-vision-preview'\n | 'gpt-4-1106-vision-preview'\n | 'gpt-4'\n | 'gpt-4-0314'\n | 'gpt-4-0613'\n | 'gpt-4-32k'\n | 'gpt-4-32k-0314'\n | 'gpt-4-32k-0613'\n | 'gpt-3.5-turbo'\n | 'gpt-3.5-turbo-16k'\n | 'gpt-3.5-turbo-0301'\n | 'gpt-3.5-turbo-0613'\n | 'gpt-3.5-turbo-1106'\n | 'gpt-3.5-turbo-16k-0613';\n\nexport type WhisperModels = 'whisper-1';\n\nexport type STTModels =\n | WhisperModels\n | 'gpt-transcribe'\n | 'gpt-4o-transcribe'\n | 'gpt-4o-mini-transcribe'\n | 'gpt-live-transcribe'\n | 'gpt-realtime-whisper';\n\nexport type TTSModels = 'tts-1' | 'tts-1-hd' | 'gpt-4o-mini-tts';\n\nexport type TTSVoices =\n | 'alloy'\n | 'ash'\n | 'ballad'\n | 'coral'\n | 'echo'\n | 'fable'\n | 'nova'\n | 'onyx'\n | 'sage'\n | 'shimmer';\n\nexport type DalleModels = 'dall-e-2' | 'dall-e-3';\n\nexport type EmbeddingModels =\n | 'text-embedding-ada-002'\n | 'text-embedding-3-small'\n | 'text-embedding-3-large';\n\nexport type AssistantTools = 'code_interpreter' | 'file_search' | 'function';\n\nexport type VertexModels =\n | 'google/gemini-2.0-flash-exp'\n | 'google/gemini-1.5-flash'\n | 'google/gemini-1.5-pro'\n | 'google/gemini-1.0-pro-vision'\n | 'google/gemini-1.0-pro-vision-001'\n | 'google/gemini-1.0-pro-002'\n | 'google/gemini-1.0-pro-001'\n | 'google/gemini-1.0-pro';\n\n// adapters for OpenAI-compatible LLMs, TTSs, STTs\n\nexport type TelnyxChatModels =\n | 'meta-llama/Meta-Llama-3.1-8B-Instruct'\n | 'meta-llama/Meta-Llama-3.1-70B-Instruct';\n\nexport type CerebrasChatModels = 'gpt-oss-120b' | 'qwen-3.8-27b' | 'zai-glm-4.7' | 'gemma-4-31b';\n\nexport type PerplexityChatModels =\n | 'llama-3.1-sonar-small-128k-online'\n | 'llama-3.1-sonar-small-128k-chat'\n | 'llama-3.1-sonar-large-128k-online'\n | 'llama-3.1-sonar-large-128k-chat'\n | 'llama-3.1-8b-instruct'\n | 'llama-3.1-70b-instruct';\n\nexport type GroqChatModels =\n | 'llama-3.1-8b-instant'\n | 'llama-3.3-70b-versatile'\n | 'openai/gpt-oss-120b'\n | 'openai/gpt-oss-20b';\n\nexport type GroqAudioModels = 'whisper-large-v3' | 'whisper-large-v3-turbo';\n\nexport type DeepSeekChatModels = 'deepseek-coder' | 'deepseek-chat';\n\nexport type TogetherChatModels =\n | 'Austism/chronos-hermes-13b'\n | 'Gryphe/MythoMax-L2-13b'\n | 'NousResearch/Nous-Capybara-7B-V1p9'\n | 'NousResearch/Nous-Hermes-2-Mistral-7B-DPO'\n | 'NousResearch/Nous-Hermes-2-Mixtral-8x7B-DPO'\n | 'NousResearch/Nous-Hermes-2-Mixtral-8x7B-SFT'\n | 'NousResearch/Nous-Hermes-2-Yi-34B'\n | 'NousResearch/Nous-Hermes-Llama2-13b'\n | 'NousResearch/Nous-Hermes-llama-2-7b'\n | 'Open-Orca/Mistral-7B-OpenOrca'\n | 'Qwen/Qwen1.5-0.5B-Chat'\n | 'Qwen/Qwen1.5-1.8B-Chat'\n | 'Qwen/Qwen1.5-110B-Chat'\n | 'Qwen/Qwen1.5-14B-Chat'\n | 'Qwen/Qwen1.5-32B-Chat'\n | 'Qwen/Qwen1.5-4B-Chat'\n | 'Qwen/Qwen1.5-72B-Chat'\n | 'Qwen/Qwen1.5-7B-Chat'\n | 'Qwen/Qwen2-72B-Instruct'\n | 'Snowflake/snowflake-arctic-instruct'\n | 'Undi95/ReMM-SLERP-L2-13B'\n | 'Undi95/Toppy-M-7B'\n | 'WizardLM/WizardLM-13B-V1.2'\n | 'allenai/OLMo-7B'\n | 'allenai/OLMo-7B-Instruct'\n | 'allenai/OLMo-7B-Twin-2T'\n | 'codellama/CodeLlama-13b-Instruct-hf'\n | 'codellama/CodeLlama-34b-Instruct-hf'\n | 'codellama/CodeLlama-70b-Instruct-hf'\n | 'codellama/CodeLlama-7b-Instruct-hf'\n | 'cognitivecomputations/dolphin-2.5-mixtral-8x7b'\n | 'databricks/dbrx-instruct'\n | 'deepseek-ai/deepseek-coder-33b-instruct'\n | 'deepseek-ai/deepseek-llm-67b-chat'\n | 'garage-bAInd/Platypus2-70B-instruct'\n | 'google/gemma-2-27b-it'\n | 'google/gemma-2-9b-it'\n | 'google/gemma-2b-it'\n | 'google/gemma-7b-it'\n | 'lmsys/vicuna-13b-v1.5'\n | 'lmsys/vicuna-7b-v1.5'\n | 'meta-llama/Llama-2-13b-chat-hf'\n | 'meta-llama/Llama-2-70b-chat-hf'\n | 'meta-llama/Llama-2-7b-chat-hf'\n | 'meta-llama/Llama-3-70b-chat-hf'\n | 'meta-llama/Llama-3-8b-chat-hf'\n | 'meta-llama/Meta-Llama-3-70B-Instruct-Lite'\n | 'meta-llama/Meta-Llama-3-70B-Instruct-Turbo'\n | 'meta-llama/Meta-Llama-3-8B-Instruct-Lite'\n | 'meta-llama/Meta-Llama-3-8B-Instruct-Turbo'\n | 'meta-llama/Meta-Llama-3.1-405B-Instruct-Turbo'\n | 'meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo'\n | 'meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo'\n | 'meta-llama/Llama-3.3-70B-Instruct-Turbo'\n | 'mistralai/Mistral-7B-Instruct-v0.1'\n | 'mistralai/Mistral-7B-Instruct-v0.2'\n | 'mistralai/Mistral-7B-Instruct-v0.3'\n | 'mistralai/Mixtral-8x22B-Instruct-v0.1'\n | 'mistralai/Mixtral-8x7B-Instruct-v0.1'\n | 'openchat/openchat-3.5-1210'\n | 'snorkelai/Snorkel-Mistral-PairRM-DPO'\n | 'teknium/OpenHermes-2-Mistral-7B'\n | 'teknium/OpenHermes-2p5-Mistral-7B'\n | 'togethercomputer/Llama-2-7B-32K-Instruct'\n | 'togethercomputer/RedPajama-INCITE-7B-Chat'\n | 'togethercomputer/RedPajama-INCITE-Chat-3B-v1'\n | 'togethercomputer/StripedHyena-Nous-7B'\n | 'togethercomputer/alpaca-7b'\n | 'upstage/SOLAR-10.7B-Instruct-v1.0'\n | 'zero-one-ai/Yi-34B-Chat';\n\nexport type OctoChatModels =\n | 'meta-llama-3-70b-instruct'\n | 'meta-llama-3.1-405b-instruct'\n | 'meta-llama-3.1-70b-instruct'\n | 'meta-llama-3.1-8b-instruct'\n | 'mistral-7b-instruct'\n | 'mixtral-8x7b-instruct'\n | 'wizardlm-2-8x22bllamaguard-2-7b';\n\nexport type XAIChatModels =\n | 'grok-3'\n | 'grok-3-fast'\n | 'grok-3-mini'\n | 'grok-3-mini-fast'\n | 'grok-2-vision-1212'\n | 'grok-2-image-1212'\n | 'grok-2-1212';\n\nexport type MetaChatModels =\n | 'Llama-4-Scout-17B-16E-Instruct-FP8'\n | 'Llama-4-Maverick-17B-128E-Instruct-FP8'\n | 'Llama-3.3-70B-Instruct'\n | 'Llama-3.3-8B-Instruct';\n\nexport type ReasoningEffort = 'none' | 'minimal' | 'low' | 'medium' | 'high';\n\nexport type Reasoning = { effort?: ReasoningEffort | null; [key: string]: unknown };\n\nexport function supportsReasoningEffort(model: ChatModels | string): boolean {\n return [\n 'gpt-5.6-luna',\n 'gpt-5.6-sol',\n 'gpt-5.6-terra',\n 'gpt-5.5',\n 'gpt-5.4',\n 'gpt-5.4-mini',\n 'gpt-5.2',\n 'gpt-5.1',\n 'gpt-5',\n 'gpt-5-mini',\n 'gpt-5-nano',\n ].includes(model);\n}\n\nexport function defaultReasoningEffort(model: ChatModels | string): ReasoningEffort | undefined {\n if (!supportsReasoningEffort(model)) {\n return undefined;\n }\n\n if (\n [\n 'gpt-5.1',\n 'gpt-5.2',\n 'gpt-5.4',\n 'gpt-5.4-mini',\n 'gpt-5.5',\n 'gpt-5.6-luna',\n 'gpt-5.6-sol',\n 'gpt-5.6-terra',\n ].includes(model)\n ) {\n return 'none';\n }\n\n return 'minimal';\n}\n"],"mappings":"AAuNO,SAAS,wBAAwB,OAAqC;AAC3E,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,EAAE,SAAS,KAAK;AAClB;AAEO,SAAS,uBAAuB,OAAyD;AAC9F,MAAI,CAAC,wBAAwB,KAAK,GAAG;AACnC,WAAO;AAAA,EACT;AAEA,MACE;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,EAAE,SAAS,KAAK,GAChB;AACA,WAAO;AAAA,EACT;AAEA,SAAO;AACT;","names":[]}
1
+ {"version":3,"sources":["../src/models.ts"],"sourcesContent":["// SPDX-FileCopyrightText: 2024 LiveKit, Inc.\n//\n// SPDX-License-Identifier: Apache-2.0\n\nexport type { RealtimeModels } from '@livekit/agents/llm/openai_realtime/api_proto';\n\nexport type ChatModels =\n | 'gpt-5.6-luna'\n | 'gpt-5.6-sol'\n | 'gpt-5.6-terra'\n | 'gpt-5.5'\n | 'gpt-5.4'\n | 'gpt-5.4-mini'\n | 'gpt-5.3-chat-latest'\n | 'gpt-5.2'\n | 'gpt-5.2-chat-latest'\n | 'gpt-5.1'\n | 'gpt-5.1-chat-latest'\n | 'gpt-5'\n | 'gpt-5-mini'\n | 'gpt-5-nano'\n | 'gpt-4.1'\n | 'gpt-4.1-mini'\n | 'gpt-4.1-nano'\n | 'gpt-4o'\n | 'gpt-4o-2024-05-13'\n | 'gpt-4o-mini'\n | 'gpt-4o-mini-2024-07-18'\n | 'gpt-4-turbo'\n | 'gpt-4-turbo-2024-04-09'\n | 'gpt-4-turbo-preview'\n | 'gpt-4-0125-preview'\n | 'gpt-4-1106-preview'\n | 'gpt-4-vision-preview'\n | 'gpt-4-1106-vision-preview'\n | 'gpt-4'\n | 'gpt-4-0314'\n | 'gpt-4-0613'\n | 'gpt-4-32k'\n | 'gpt-4-32k-0314'\n | 'gpt-4-32k-0613'\n | 'gpt-3.5-turbo'\n | 'gpt-3.5-turbo-16k'\n | 'gpt-3.5-turbo-0301'\n | 'gpt-3.5-turbo-0613'\n | 'gpt-3.5-turbo-1106'\n | 'gpt-3.5-turbo-16k-0613';\n\nexport type WhisperModels = 'whisper-1';\n\nexport type STTModels =\n | WhisperModels\n | 'gpt-transcribe'\n | 'gpt-4o-transcribe'\n | 'gpt-4o-mini-transcribe'\n | 'gpt-live-transcribe'\n | 'gpt-realtime-whisper';\n\nexport type TTSModels = 'tts-1' | 'tts-1-hd' | 'gpt-4o-mini-tts';\n\nexport type TTSVoices =\n | 'alloy'\n | 'ash'\n | 'ballad'\n | 'coral'\n | 'echo'\n | 'fable'\n | 'nova'\n | 'onyx'\n | 'sage'\n | 'shimmer';\n\nexport type DalleModels = 'dall-e-2' | 'dall-e-3';\n\nexport type EmbeddingModels =\n | 'text-embedding-ada-002'\n | 'text-embedding-3-small'\n | 'text-embedding-3-large';\n\nexport type AssistantTools = 'code_interpreter' | 'file_search' | 'function';\n\nexport type VertexModels =\n | 'google/gemini-2.0-flash-exp'\n | 'google/gemini-1.5-flash'\n | 'google/gemini-1.5-pro'\n | 'google/gemini-1.0-pro-vision'\n | 'google/gemini-1.0-pro-vision-001'\n | 'google/gemini-1.0-pro-002'\n | 'google/gemini-1.0-pro-001'\n | 'google/gemini-1.0-pro';\n\n// adapters for OpenAI-compatible LLMs, TTSs, STTs\n\nexport type TelnyxChatModels =\n | 'meta-llama/Meta-Llama-3.1-8B-Instruct'\n | 'meta-llama/Meta-Llama-3.1-70B-Instruct';\n\nexport type CerebrasChatModels = 'gpt-oss-120b' | 'qwen-3.8-27b' | 'zai-glm-4.7' | 'gemma-4-31b';\n\nexport type PerplexityChatModels =\n | 'llama-3.1-sonar-small-128k-online'\n | 'llama-3.1-sonar-small-128k-chat'\n | 'llama-3.1-sonar-large-128k-online'\n | 'llama-3.1-sonar-large-128k-chat'\n | 'llama-3.1-8b-instruct'\n | 'llama-3.1-70b-instruct';\n\nexport type GroqChatModels =\n | 'llama-3.1-8b-instant'\n | 'llama-3.3-70b-versatile'\n | 'openai/gpt-oss-120b'\n | 'openai/gpt-oss-20b';\n\nexport type GroqAudioModels = 'whisper-large-v3' | 'whisper-large-v3-turbo';\n\nexport type DeepSeekChatModels = 'deepseek-coder' | 'deepseek-chat';\n\nexport type TogetherChatModels =\n | 'Austism/chronos-hermes-13b'\n | 'Gryphe/MythoMax-L2-13b'\n | 'NousResearch/Nous-Capybara-7B-V1p9'\n | 'NousResearch/Nous-Hermes-2-Mistral-7B-DPO'\n | 'NousResearch/Nous-Hermes-2-Mixtral-8x7B-DPO'\n | 'NousResearch/Nous-Hermes-2-Mixtral-8x7B-SFT'\n | 'NousResearch/Nous-Hermes-2-Yi-34B'\n | 'NousResearch/Nous-Hermes-Llama2-13b'\n | 'NousResearch/Nous-Hermes-llama-2-7b'\n | 'Open-Orca/Mistral-7B-OpenOrca'\n | 'Qwen/Qwen1.5-0.5B-Chat'\n | 'Qwen/Qwen1.5-1.8B-Chat'\n | 'Qwen/Qwen1.5-110B-Chat'\n | 'Qwen/Qwen1.5-14B-Chat'\n | 'Qwen/Qwen1.5-32B-Chat'\n | 'Qwen/Qwen1.5-4B-Chat'\n | 'Qwen/Qwen1.5-72B-Chat'\n | 'Qwen/Qwen1.5-7B-Chat'\n | 'Qwen/Qwen2-72B-Instruct'\n | 'Snowflake/snowflake-arctic-instruct'\n | 'Undi95/ReMM-SLERP-L2-13B'\n | 'Undi95/Toppy-M-7B'\n | 'WizardLM/WizardLM-13B-V1.2'\n | 'allenai/OLMo-7B'\n | 'allenai/OLMo-7B-Instruct'\n | 'allenai/OLMo-7B-Twin-2T'\n | 'codellama/CodeLlama-13b-Instruct-hf'\n | 'codellama/CodeLlama-34b-Instruct-hf'\n | 'codellama/CodeLlama-70b-Instruct-hf'\n | 'codellama/CodeLlama-7b-Instruct-hf'\n | 'cognitivecomputations/dolphin-2.5-mixtral-8x7b'\n | 'databricks/dbrx-instruct'\n | 'deepseek-ai/deepseek-coder-33b-instruct'\n | 'deepseek-ai/deepseek-llm-67b-chat'\n | 'garage-bAInd/Platypus2-70B-instruct'\n | 'google/gemma-2-27b-it'\n | 'google/gemma-2-9b-it'\n | 'google/gemma-2b-it'\n | 'google/gemma-7b-it'\n | 'lmsys/vicuna-13b-v1.5'\n | 'lmsys/vicuna-7b-v1.5'\n | 'meta-llama/Llama-2-13b-chat-hf'\n | 'meta-llama/Llama-2-70b-chat-hf'\n | 'meta-llama/Llama-2-7b-chat-hf'\n | 'meta-llama/Llama-3-70b-chat-hf'\n | 'meta-llama/Llama-3-8b-chat-hf'\n | 'meta-llama/Meta-Llama-3-70B-Instruct-Lite'\n | 'meta-llama/Meta-Llama-3-70B-Instruct-Turbo'\n | 'meta-llama/Meta-Llama-3-8B-Instruct-Lite'\n | 'meta-llama/Meta-Llama-3-8B-Instruct-Turbo'\n | 'meta-llama/Meta-Llama-3.1-405B-Instruct-Turbo'\n | 'meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo'\n | 'meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo'\n | 'meta-llama/Llama-3.3-70B-Instruct-Turbo'\n | 'mistralai/Mistral-7B-Instruct-v0.1'\n | 'mistralai/Mistral-7B-Instruct-v0.2'\n | 'mistralai/Mistral-7B-Instruct-v0.3'\n | 'mistralai/Mixtral-8x22B-Instruct-v0.1'\n | 'mistralai/Mixtral-8x7B-Instruct-v0.1'\n | 'openchat/openchat-3.5-1210'\n | 'snorkelai/Snorkel-Mistral-PairRM-DPO'\n | 'teknium/OpenHermes-2-Mistral-7B'\n | 'teknium/OpenHermes-2p5-Mistral-7B'\n | 'togethercomputer/Llama-2-7B-32K-Instruct'\n | 'togethercomputer/RedPajama-INCITE-7B-Chat'\n | 'togethercomputer/RedPajama-INCITE-Chat-3B-v1'\n | 'togethercomputer/StripedHyena-Nous-7B'\n | 'togethercomputer/alpaca-7b'\n | 'upstage/SOLAR-10.7B-Instruct-v1.0'\n | 'zero-one-ai/Yi-34B-Chat';\n\nexport type OctoChatModels =\n | 'meta-llama-3-70b-instruct'\n | 'meta-llama-3.1-405b-instruct'\n | 'meta-llama-3.1-70b-instruct'\n | 'meta-llama-3.1-8b-instruct'\n | 'mistral-7b-instruct'\n | 'mixtral-8x7b-instruct'\n | 'wizardlm-2-8x22bllamaguard-2-7b';\n\nexport type XAIChatModels =\n | 'grok-3'\n | 'grok-3-fast'\n | 'grok-3-mini'\n | 'grok-3-mini-fast'\n | 'grok-2-vision-1212'\n | 'grok-2-image-1212'\n | 'grok-2-1212';\n\nexport type MetaChatModels =\n | 'Llama-4-Scout-17B-16E-Instruct-FP8'\n | 'Llama-4-Maverick-17B-128E-Instruct-FP8'\n | 'Llama-3.3-70B-Instruct'\n | 'Llama-3.3-8B-Instruct';\n\nexport type ReasoningEffort = 'none' | 'minimal' | 'low' | 'medium' | 'high';\n\nexport type Reasoning = { effort?: ReasoningEffort | null; [key: string]: unknown };\n\nexport function supportsReasoningEffort(model: ChatModels | string): boolean {\n return [\n 'gpt-5.6-luna',\n 'gpt-5.6-sol',\n 'gpt-5.6-terra',\n 'gpt-5.5',\n 'gpt-5.4',\n 'gpt-5.4-mini',\n 'gpt-5.2',\n 'gpt-5.1',\n 'gpt-5',\n 'gpt-5-mini',\n 'gpt-5-nano',\n ].includes(model);\n}\n\nexport function defaultReasoningEffort(model: ChatModels | string): ReasoningEffort | undefined {\n if (!supportsReasoningEffort(model)) {\n return undefined;\n }\n\n if (\n [\n 'gpt-5.1',\n 'gpt-5.2',\n 'gpt-5.4',\n 'gpt-5.4-mini',\n 'gpt-5.5',\n 'gpt-5.6-luna',\n 'gpt-5.6-sol',\n 'gpt-5.6-terra',\n ].includes(model)\n ) {\n return 'none';\n }\n\n return 'minimal';\n}\n"],"mappings":"AAyNO,SAAS,wBAAwB,OAAqC;AAC3E,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,EAAE,SAAS,KAAK;AAClB;AAEO,SAAS,uBAAuB,OAAyD;AAC9F,MAAI,CAAC,wBAAwB,KAAK,GAAG;AACnC,WAAO;AAAA,EACT;AAEA,MACE;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,EAAE,SAAS,KAAK,GAChB;AACA,WAAO;AAAA,EACT;AAEA,SAAO;AACT;","names":[]}
@@ -3,10 +3,6 @@ var __defProp = Object.defineProperty;
3
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
6
  var __copyProps = (to, from, except, desc) => {
11
7
  if (from && typeof from === "object" || typeof from === "function") {
12
8
  for (let key of __getOwnPropNames(from))
@@ -15,27 +11,13 @@ var __copyProps = (to, from, except, desc) => {
15
11
  }
16
12
  return to;
17
13
  };
14
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
18
15
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
16
  var api_proto_exports = {};
20
- __export(api_proto_exports, {
21
- BASE_URL: () => BASE_URL,
22
- IN_FRAME_SIZE: () => IN_FRAME_SIZE,
23
- NUM_CHANNELS: () => NUM_CHANNELS,
24
- OUT_FRAME_SIZE: () => OUT_FRAME_SIZE,
25
- SAMPLE_RATE: () => SAMPLE_RATE
26
- });
27
17
  module.exports = __toCommonJS(api_proto_exports);
28
- const SAMPLE_RATE = 24e3;
29
- const NUM_CHANNELS = 1;
30
- const IN_FRAME_SIZE = 2400;
31
- const OUT_FRAME_SIZE = 1200;
32
- const BASE_URL = "wss://api.openai.com/v1";
18
+ __reExport(api_proto_exports, require("@livekit/agents/llm/openai_realtime/api_proto"), module.exports);
33
19
  // Annotate the CommonJS export names for ESM import in node:
34
20
  0 && (module.exports = {
35
- BASE_URL,
36
- IN_FRAME_SIZE,
37
- NUM_CHANNELS,
38
- OUT_FRAME_SIZE,
39
- SAMPLE_RATE
21
+ ...require("@livekit/agents/llm/openai_realtime/api_proto")
40
22
  });
41
23
  //# sourceMappingURL=api_proto.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/realtime/api_proto.ts"],"sourcesContent":["// SPDX-FileCopyrightText: 2024 LiveKit, Inc.\n//\n// SPDX-License-Identifier: Apache-2.0\n\nexport const SAMPLE_RATE = 24000;\nexport const NUM_CHANNELS = 1;\nexport const IN_FRAME_SIZE = 2400; // 100ms\nexport const OUT_FRAME_SIZE = 1200; // 50ms\n\nexport const BASE_URL = 'wss://api.openai.com/v1';\n\nexport type Model = 'gpt-4o-realtime-preview-2024-10-01' | string; // Open-ended, for future models\n\n/**\n * Models that support the `reasoning` configuration on the Realtime API.\n * Currently only the `gpt-realtime-2` family supports it.\n *\n * Ref: https://developers.openai.com/api/reference/resources/realtime/subresources/calls/methods/accept\n */\nexport type ReasoningEffort = 'minimal' | 'low' | 'medium' | 'high' | 'xhigh';\n\nexport interface Reasoning {\n effort?: ReasoningEffort;\n}\nexport type Voice =\n | 'alloy'\n | 'shimmer'\n | 'echo'\n | 'ash'\n | 'ballad'\n | 'coral'\n | 'sage'\n | 'verse'\n | string;\n\n/** @deprecated Use LegacyAudioFormat for Beta API string format or AudioFormat for GA API object format */\nexport type LegacyAudioFormat = 'pcm16'; // TODO: 'g711-ulaw' | 'g711-alaw' (Beta format)\nexport type Role = 'system' | 'assistant' | 'user' | 'tool';\nexport type GenerationFinishedReason = 'stop' | 'max_tokens' | 'content_filter' | 'interrupt';\nexport type InputTranscriptionModel = 'whisper-1' | string; // Open-ended, for future models\nexport type Modality = 'text' | 'audio';\nexport type ToolChoice = 'auto' | 'none' | 'required' | string;\nexport type State = 'initializing' | 'listening' | 'thinking' | 'speaking' | string;\nexport type ResponseStatus =\n | 'in_progress'\n | 'completed'\n | 'incomplete'\n | 'cancelled'\n | 'failed'\n | string;\nexport type ClientEventType =\n | 'session.update'\n | 'input_audio_buffer.append'\n | 'input_audio_buffer.commit'\n | 'input_audio_buffer.clear'\n | 'conversation.item.create'\n | 'conversation.item.truncate'\n | 'conversation.item.delete'\n | 'response.create'\n | 'response.cancel';\n\nexport type ServerEventType =\n | 'error'\n | 'session.created'\n | 'session.updated'\n | 'conversation.created'\n | 'input_audio_buffer.committed'\n | 'input_audio_buffer.cleared'\n | 'input_audio_buffer.speech_started'\n | 'input_audio_buffer.speech_stopped'\n | 'conversation.item.added' // GA: renamed from conversation.item.created\n | 'conversation.item.created' // Beta: kept for backward compatibility\n | 'conversation.item.input_audio_transcription.delta'\n | 'conversation.item.input_audio_transcription.completed'\n | 'conversation.item.input_audio_transcription.failed'\n | 'conversation.item.truncated'\n | 'conversation.item.deleted'\n | 'response.created'\n | 'response.done'\n | 'response.output_item.added'\n | 'response.output_item.done'\n | 'response.content_part.added'\n | 'response.content_part.done'\n | 'response.output_text.delta' // GA: renamed from response.text.delta\n | 'response.output_text.done' // GA: renamed from response.text.done\n | 'response.text.delta' // Beta: kept for backward compatibility\n | 'response.text.done' // Beta: kept for backward compatibility\n | 'response.output_audio_transcript.delta' // GA: renamed from response.audio_transcript.delta\n | 'response.output_audio_transcript.done' // GA: renamed from response.audio_transcript.done\n | 'response.audio_transcript.delta' // Beta: kept for backward compatibility\n | 'response.audio_transcript.done' // Beta: kept for backward compatibility\n | 'response.output_audio.delta' // GA: renamed from response.audio.delta\n | 'response.output_audio.done' // GA: renamed from response.audio.done\n | 'response.audio.delta' // Beta: kept for backward compatibility\n | 'response.audio.done' // Beta: kept for backward compatibility\n | 'response.function_call_arguments.delta'\n | 'response.function_call_arguments.done'\n | 'rate_limits.updated';\n\nexport type AudioBase64Bytes = string;\n\nexport interface Tool {\n type: 'function';\n name: string;\n description?: string;\n parameters: {\n type: 'object';\n properties: {\n [prop: string]: {\n [prop: string]: any;\n };\n };\n required: string[];\n };\n}\n\nexport type TurnDetectionType =\n | {\n type: 'semantic_vad';\n eagerness?: 'auto' | 'low' | 'medium' | 'high'; // default: auto\n create_response?: boolean; // default: true\n interrupt_response?: boolean; // default: true\n }\n | {\n type: 'server_vad';\n threshold?: number; // 0.0 to 1.0, default: 0.5\n prefix_padding_ms?: number; // default: 300\n silence_duration_ms?: number; // default: 200\n create_response?: boolean; // default: true\n interrupt_response?: boolean; // default: true\n };\n\nexport type InputAudioTranscription = {\n model: InputTranscriptionModel;\n language?: string;\n languages?: string[];\n keywords?: string[];\n prompt?: string;\n};\n\nexport type NoiseReductionType = 'near_field' | 'far_field';\n\nexport interface NoiseReduction {\n type: NoiseReductionType;\n}\n\nexport interface AudioFormat {\n type: 'audio/pcm';\n rate: number;\n}\n\nexport interface RealtimeAudioConfigInput {\n format?: AudioFormat;\n noise_reduction?: NoiseReduction | null;\n transcription?: InputAudioTranscription | null;\n turn_detection?: TurnDetectionType | null;\n}\n\nexport interface RealtimeAudioConfigOutput {\n format?: AudioFormat;\n speed?: number;\n voice?: Voice;\n}\n\nexport interface RealtimeAudioConfig {\n input?: RealtimeAudioConfigInput;\n output?: RealtimeAudioConfigOutput;\n}\n\nexport interface InputTextContent {\n type: 'input_text';\n text: string;\n}\n\nexport interface InputAudioContent {\n type: 'input_audio';\n audio: AudioBase64Bytes;\n}\n\nexport interface InputImageContent {\n type: 'input_image';\n image_url: string;\n}\n\nexport interface TextContent {\n type: 'text';\n text: string;\n}\n\nexport interface OutputTextContent {\n type: 'output_text';\n text: string;\n}\n\nexport interface AudioContent {\n type: 'audio';\n audio: AudioBase64Bytes;\n transcript: string;\n}\n\nexport type Content =\n | InputTextContent\n | InputAudioContent\n | InputImageContent\n | TextContent\n | OutputTextContent\n | AudioContent;\nexport type ContentPart = {\n type: 'text' | 'audio' | 'output_text' | 'output_audio'; // GA: output_text/output_audio\n audio?: AudioBase64Bytes;\n transcript?: string;\n text?: string; // GA: text field for output_text\n};\n\nexport interface BaseItem {\n id: string;\n object: 'realtime.item';\n type: string;\n}\n\nexport interface SystemItem extends BaseItem {\n type: 'message';\n role: 'system';\n content: InputTextContent;\n}\n\nexport interface UserItem extends BaseItem {\n type: 'message';\n role: 'user';\n content: (InputTextContent | InputAudioContent | InputImageContent)[];\n}\n\nexport interface AssistantItem extends BaseItem {\n type: 'message';\n role: 'assistant';\n content: (TextContent | OutputTextContent | AudioContent)[];\n}\n\nexport interface FunctionCallItem extends BaseItem {\n type: 'function_call';\n call_id: string;\n name: string;\n arguments: string;\n}\n\nexport interface FunctionCallOutputItem extends BaseItem {\n type: 'function_call_output';\n call_id: string;\n output: string;\n}\n\nexport type ItemResource =\n | SystemItem\n | UserItem\n | AssistantItem\n | FunctionCallItem\n | FunctionCallOutputItem;\n\n// Session Resource\nexport interface SessionResource {\n id: string;\n object: 'realtime.session';\n model: string;\n modalities: Modality[]; // default: [\"text\", \"audio\"]\n instructions: string;\n voice: Voice; // default: \"alloy\"\n input_audio_format: LegacyAudioFormat; // default: \"pcm16\"\n output_audio_format: LegacyAudioFormat; // default: \"pcm16\"\n input_audio_transcription: InputAudioTranscription | null;\n turn_detection: TurnDetectionType | null;\n tools: Tool[];\n tool_choice: ToolChoice; // default: \"auto\"\n temperature: number; // default: 0.8\n max_response_output_tokens: number | 'inf';\n expires_at: number;\n}\n\n// Conversation Resource\nexport interface ConversationResource {\n id: string;\n object: 'realtime.conversation';\n}\n\nexport type ResponseStatusDetails =\n | string\n | {\n type: 'incomplete';\n reason: 'max_output_tokens' | 'content_filter' | string;\n }\n | {\n type: 'failed';\n error?: {\n code: 'server_error' | 'rate_limit_exceeded' | string;\n message: string;\n };\n }\n | {\n type: 'cancelled';\n reason: 'turn_detected' | 'client_cancelled' | string;\n };\n\nexport interface ModelUsage {\n total_tokens: number;\n input_tokens: number;\n output_tokens: number;\n input_token_details: {\n text_tokens: number;\n audio_tokens: number;\n cached_tokens: number;\n cached_tokens_details: {\n text_tokens: number;\n audio_tokens: number;\n image_tokens: number;\n };\n };\n output_token_details: {\n text_tokens: number;\n audio_tokens: number;\n };\n}\n\nexport interface ResponseResource {\n id: string;\n object: 'realtime.response';\n status: ResponseStatus;\n status_details: ResponseStatusDetails;\n output: ItemResource[];\n usage?: ModelUsage;\n metadata?: Record<string, string>;\n}\n\n// Client Events\ninterface BaseClientEvent {\n event_id?: string;\n type: ClientEventType;\n}\n\nexport interface SessionUpdateEvent extends BaseClientEvent {\n type: 'session.update';\n session: Partial<{\n // GA fields\n type?: 'realtime' | 'transcription'; // GA: session type\n output_modalities?: Modality[]; // GA: renamed from modalities\n audio?: RealtimeAudioConfig; // GA: nested audio config\n max_output_tokens?: number | 'inf'; // GA: renamed from max_response_output_tokens\n tracing?: TracingConfig | null; // GA: tracing config\n reasoning?: Reasoning | null; // GA: reasoning config (gpt-realtime-2 only)\n // Common fields\n model: Model;\n instructions: string;\n tools: Tool[];\n tool_choice: ToolChoice;\n // Beta fields (kept for backward compatibility)\n modalities: Modality[];\n voice: Voice;\n input_audio_format: LegacyAudioFormat;\n output_audio_format: LegacyAudioFormat;\n input_audio_transcription: InputAudioTranscription | null;\n turn_detection: TurnDetectionType | null;\n temperature: number;\n max_response_output_tokens?: number | 'inf';\n speed?: number;\n }>;\n}\n\nexport interface TracingConfig {\n enabled?: boolean;\n}\n\nexport interface InputAudioBufferAppendEvent extends BaseClientEvent {\n type: 'input_audio_buffer.append';\n audio: AudioBase64Bytes;\n}\n\nexport interface InputAudioBufferCommitEvent extends BaseClientEvent {\n type: 'input_audio_buffer.commit';\n}\n\nexport interface InputAudioBufferClearEvent extends BaseClientEvent {\n type: 'input_audio_buffer.clear';\n}\n\nexport interface UserItemCreate {\n id: string;\n type: 'message';\n role: 'user';\n content: (InputTextContent | InputAudioContent | InputImageContent)[];\n}\n\nexport interface AssistantItemCreate {\n id: string;\n type: 'message';\n role: 'assistant';\n content: TextContent[];\n}\n\nexport interface SystemItemCreate {\n id: string;\n type: 'message';\n role: 'system';\n content: InputTextContent[];\n}\n\nexport interface FunctionCallOutputItemCreate {\n id: string;\n type: 'function_call_output';\n call_id: string;\n output: string;\n}\n\nexport type ConversationItemCreateContent =\n | UserItemCreate\n | AssistantItemCreate\n | SystemItemCreate\n | FunctionCallOutputItemCreate;\n\nexport interface ConversationItemCreateEvent extends BaseClientEvent {\n type: 'conversation.item.create';\n previous_item_id?: string;\n item: ConversationItemCreateContent;\n}\n\nexport interface ConversationItemTruncateEvent extends BaseClientEvent {\n type: 'conversation.item.truncate';\n item_id: string;\n content_index: number;\n audio_end_ms: number;\n}\n\nexport interface ConversationItemDeleteEvent extends BaseClientEvent {\n type: 'conversation.item.delete';\n item_id: string;\n}\n\nexport interface ResponseCreateEvent extends BaseClientEvent {\n type: 'response.create';\n response?: Partial<{\n modalities: Modality[];\n instructions: string;\n voice: Voice;\n output_audio_format: LegacyAudioFormat;\n tools?: Tool[];\n tool_choice: ToolChoice;\n temperature: number;\n max_output_tokens: number | 'inf';\n metadata?: Record<string, string>;\n }>;\n}\n\nexport interface ResponseCancelEvent extends BaseClientEvent {\n type: 'response.cancel';\n response_id?: string;\n}\n\nexport type ClientEvent =\n | SessionUpdateEvent\n | InputAudioBufferAppendEvent\n | InputAudioBufferCommitEvent\n | InputAudioBufferClearEvent\n | ConversationItemCreateEvent\n | ConversationItemTruncateEvent\n | ConversationItemDeleteEvent\n | ResponseCreateEvent\n | ResponseCancelEvent;\n\ninterface BaseServerEvent {\n event_id: string;\n type: ServerEventType;\n}\n\nexport interface ErrorEvent extends BaseServerEvent {\n type: 'error';\n error: {\n type: 'invalid_request_error' | 'server_error' | string;\n code?: string;\n message: string;\n param: string;\n event_id: string;\n };\n}\n\nexport interface SessionCreatedEvent extends BaseServerEvent {\n type: 'session.created';\n session: SessionResource;\n}\n\nexport interface SessionUpdatedEvent extends BaseServerEvent {\n type: 'session.updated';\n session: SessionResource;\n}\n\nexport interface ConversationCreatedEvent extends BaseServerEvent {\n type: 'conversation.created';\n conversation: ConversationResource;\n}\n\nexport interface InputAudioBufferCommittedEvent extends BaseServerEvent {\n type: 'input_audio_buffer.committed';\n item_id: string;\n}\n\nexport interface InputAudioBufferClearedEvent extends BaseServerEvent {\n type: 'input_audio_buffer.cleared';\n}\n\nexport interface InputAudioBufferSpeechStartedEvent extends BaseServerEvent {\n type: 'input_audio_buffer.speech_started';\n audio_start_ms: number;\n item_id: string;\n}\n\nexport interface InputAudioBufferSpeechStoppedEvent extends BaseServerEvent {\n type: 'input_audio_buffer.speech_stopped';\n audio_end_ms: number;\n item_id: string;\n}\n\nexport interface ConversationItemCreatedEvent extends BaseServerEvent {\n type: 'conversation.item.created';\n previous_item_id: string;\n item: ItemResource;\n}\n\nexport interface ConversationItemAddedEvent extends BaseServerEvent {\n type: 'conversation.item.added';\n previous_item_id: string;\n item: ItemResource;\n}\n\nexport interface ConversationItemInputAudioTranscriptionDeltaEvent extends BaseServerEvent {\n type: 'conversation.item.input_audio_transcription.delta';\n item_id: string;\n content_index?: number;\n delta?: string;\n}\n\nexport interface ConversationItemInputAudioTranscriptionCompletedEvent extends BaseServerEvent {\n type: 'conversation.item.input_audio_transcription.completed';\n item_id: string;\n content_index: number;\n transcript: string;\n status?: 'in_progress' | 'completed' | string;\n}\n\nexport interface ConversationItemInputAudioTranscriptionFailedEvent extends BaseServerEvent {\n type: 'conversation.item.input_audio_transcription.failed';\n item_id: string;\n content_index: number;\n error: {\n type: string;\n code?: string;\n message: string;\n param: null;\n };\n}\n\nexport interface ConversationItemTruncatedEvent extends BaseServerEvent {\n type: 'conversation.item.truncated';\n item_id: string;\n content_index: number;\n audio_end_ms: number;\n}\n\nexport interface ConversationItemDeletedEvent extends BaseServerEvent {\n type: 'conversation.item.deleted';\n item_id: string;\n}\n\nexport interface ResponseCreatedEvent extends BaseServerEvent {\n type: 'response.created';\n response: ResponseResource;\n}\n\nexport interface ResponseDoneEvent extends BaseServerEvent {\n type: 'response.done';\n response: ResponseResource;\n}\n\nexport interface ResponseOutputItemAddedEvent extends BaseServerEvent {\n type: 'response.output_item.added';\n response_id: string;\n output_index: number;\n item: ItemResource;\n}\n\nexport interface ResponseOutputItemDoneEvent extends BaseServerEvent {\n type: 'response.output_item.done';\n response_id: string;\n output_index: number;\n item: ItemResource;\n}\n\nexport interface ResponseContentPartAddedEvent extends BaseServerEvent {\n type: 'response.content_part.added';\n response_id: string;\n item_id: string;\n output_index: number;\n content_index: number;\n part: ContentPart;\n}\n\nexport interface ResponseContentPartDoneEvent extends BaseServerEvent {\n type: 'response.content_part.done';\n response_id: string;\n item_id: string;\n output_index: number;\n content_index: number;\n part: ContentPart;\n}\n\nexport interface ResponseTextDeltaEvent extends BaseServerEvent {\n type: 'response.text.delta';\n response_id: string;\n item_id: string;\n output_index: number;\n content_index: number;\n delta: string;\n}\n\nexport interface ResponseTextDoneEvent extends BaseServerEvent {\n type: 'response.text.done';\n response_id: string;\n item_id: string;\n output_index: number;\n content_index: number;\n text: string;\n}\n\nexport interface ResponseAudioTranscriptDeltaEvent extends BaseServerEvent {\n type: 'response.audio_transcript.delta';\n response_id: string;\n item_id: string;\n output_index: number;\n content_index: number;\n delta: string;\n // Start time of this transcript segment in seconds (relative to audio output).\n start_time?: number;\n}\n\nexport interface ResponseAudioTranscriptDoneEvent extends BaseServerEvent {\n type: 'response.audio_transcript.done';\n response_id: string;\n output_index: number;\n content_index: number;\n transcript: string;\n}\n\nexport interface ResponseAudioDeltaEvent extends BaseServerEvent {\n type: 'response.audio.delta';\n response_id: string;\n item_id: string;\n output_index: number;\n content_index: number;\n delta: AudioBase64Bytes;\n}\n\nexport interface ResponseAudioDoneEvent extends BaseServerEvent {\n type: 'response.audio.done';\n response_id: string;\n output_index: number;\n content_index: number;\n}\n\nexport interface ResponseFunctionCallArgumentsDeltaEvent extends BaseServerEvent {\n type: 'response.function_call_arguments.delta';\n response_id: string;\n output_index: number;\n delta: string;\n}\n\nexport interface ResponseFunctionCallArgumentsDoneEvent extends BaseServerEvent {\n type: 'response.function_call_arguments.done';\n response_id: string;\n output_index: number;\n arguments: string;\n}\n\nexport interface RateLimitsUpdatedEvent extends BaseServerEvent {\n type: 'rate_limits.updated';\n rate_limits: {\n name: 'requests' | 'tokens' | 'input_tokens' | 'output_tokens' | string;\n limit: number;\n remaining: number;\n reset_seconds: number;\n }[];\n}\n\nexport type ServerEvent =\n | ErrorEvent\n | SessionCreatedEvent\n | SessionUpdatedEvent\n | ConversationCreatedEvent\n | InputAudioBufferCommittedEvent\n | InputAudioBufferClearedEvent\n | InputAudioBufferSpeechStartedEvent\n | InputAudioBufferSpeechStoppedEvent\n | ConversationItemCreatedEvent\n | ConversationItemAddedEvent // GA: renamed from conversation.item.created\n | ConversationItemInputAudioTranscriptionDeltaEvent\n | ConversationItemInputAudioTranscriptionCompletedEvent\n | ConversationItemInputAudioTranscriptionFailedEvent\n | ConversationItemTruncatedEvent\n | ConversationItemDeletedEvent\n | ResponseCreatedEvent\n | ResponseDoneEvent\n | ResponseOutputItemAddedEvent\n | ResponseOutputItemDoneEvent\n | ResponseContentPartAddedEvent\n | ResponseContentPartDoneEvent\n | ResponseTextDeltaEvent\n | ResponseTextDoneEvent\n | ResponseAudioTranscriptDeltaEvent\n | ResponseAudioTranscriptDoneEvent\n | ResponseAudioDeltaEvent\n | ResponseAudioDoneEvent\n | ResponseFunctionCallArgumentsDeltaEvent\n | ResponseFunctionCallArgumentsDoneEvent\n | RateLimitsUpdatedEvent;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAIO,MAAM,cAAc;AACpB,MAAM,eAAe;AACrB,MAAM,gBAAgB;AACtB,MAAM,iBAAiB;AAEvB,MAAM,WAAW;","names":[]}
1
+ {"version":3,"sources":["../../src/realtime/api_proto.ts"],"sourcesContent":["// SPDX-FileCopyrightText: 2026 LiveKit, Inc.\n//\n// SPDX-License-Identifier: Apache-2.0\n\nexport * from '@livekit/agents/llm/openai_realtime/api_proto';\n"],"mappings":";;;;;;;;;;;;;;;AAAA;AAAA;AAIA,8BAAc,0DAJd;","names":[]}