@livekit/agents-plugin-google 1.0.50 → 1.1.0

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.
package/src/llm.test.ts CHANGED
@@ -2,15 +2,23 @@
2
2
  //
3
3
  // SPDX-License-Identifier: Apache-2.0
4
4
  import { llm } from '@livekit/agents-plugins-test';
5
- import { describe } from 'vitest';
5
+ import { describe, it } from 'vitest';
6
6
  import { LLM } from './llm.js';
7
7
 
8
- describe('Google', async () => {
9
- await llm(
10
- new LLM({
11
- model: 'gemini-2.5-flash',
12
- temperature: 0,
13
- }),
14
- true,
15
- );
16
- });
8
+ const hasGoogleApiKey = Boolean(process.env.GOOGLE_API_KEY);
9
+
10
+ if (hasGoogleApiKey) {
11
+ describe('Google', async () => {
12
+ await llm(
13
+ new LLM({
14
+ model: 'gemini-2.5-flash',
15
+ temperature: 0,
16
+ }),
17
+ true,
18
+ );
19
+ });
20
+ } else {
21
+ describe('Google', () => {
22
+ it.skip('requires GOOGLE_API_KEY', () => {});
23
+ });
24
+ }
package/src/llm.ts CHANGED
@@ -51,6 +51,13 @@ export class LLM extends llm.LLM {
51
51
  return this.#opts.model;
52
52
  }
53
53
 
54
+ get provider(): string {
55
+ if (this.#opts.vertexai) {
56
+ return 'Vertex AI';
57
+ }
58
+ return 'Gemini';
59
+ }
60
+
54
61
  /**
55
62
  * Create a new instance of Google GenAI LLM.
56
63
  *