@jaypie/llm 1.2.13 → 1.2.14

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.
@@ -12,7 +12,7 @@ import { GeminiPart, GeminiRawResponse, GeminiRequest } from "../../providers/ge
12
12
  * specific to Gemini's generateContent API.
13
13
  */
14
14
  export declare class GeminiAdapter extends BaseProviderAdapter {
15
- readonly name: "gemini";
15
+ readonly name: "google";
16
16
  readonly defaultModel: "gemini-3-pro-preview";
17
17
  buildRequest(request: OperateRequest): GeminiRequest;
18
18
  formatTools(toolkit: Toolkit, outputSchema?: JsonObject): ProviderToolDefinition[];
@@ -32,7 +32,7 @@ export declare const PROVIDER: {
32
32
  readonly TINY: "gemini-3-flash-preview";
33
33
  };
34
34
  readonly MODEL_MATCH_WORDS: readonly ["gemini", "google"];
35
- readonly NAME: "gemini";
35
+ readonly NAME: "google";
36
36
  readonly ROLE: {
37
37
  readonly MODEL: "model";
38
38
  readonly USER: "user";
package/dist/esm/index.js CHANGED
@@ -79,7 +79,7 @@ const PROVIDER = {
79
79
  TINY: FIRST_CLASS_PROVIDER.GEMINI.TINY,
80
80
  },
81
81
  MODEL_MATCH_WORDS: ["gemini", "google"],
82
- NAME: "gemini",
82
+ NAME: "google",
83
83
  ROLE: {
84
84
  MODEL: "model",
85
85
  USER: "user",
@@ -194,7 +194,7 @@ function determineModelProvider(input) {
194
194
  provider: PROVIDER.ANTHROPIC.NAME,
195
195
  };
196
196
  }
197
- if (input === PROVIDER.GEMINI.NAME) {
197
+ if (input === PROVIDER.GEMINI.NAME || input === "gemini") {
198
198
  return {
199
199
  model: PROVIDER.GEMINI.MODEL.DEFAULT,
200
200
  provider: PROVIDER.GEMINI.NAME,
@@ -5537,6 +5537,10 @@ class Llm {
5537
5537
  const { fallback, model } = options;
5538
5538
  let finalProvider = providerName;
5539
5539
  let finalModel = model;
5540
+ // Legacy: accept "gemini" but warn
5541
+ if (providerName === "gemini") {
5542
+ log$3.warn(`Provider "gemini" is deprecated, use "${PROVIDER.GEMINI.NAME}" instead`);
5543
+ }
5540
5544
  if (model) {
5541
5545
  const modelDetermined = determineModelProvider(model);
5542
5546
  finalModel = modelDetermined.model;
@@ -5551,6 +5555,10 @@ class Llm {
5551
5555
  throw new ConfigurationError(`Unable to determine provider from: ${providerName}`);
5552
5556
  }
5553
5557
  finalProvider = providerDetermined.provider;
5558
+ // When providerName is actually a model name, extract the model (#213)
5559
+ if (!finalModel && providerName !== providerDetermined.provider) {
5560
+ finalModel = providerDetermined.model;
5561
+ }
5554
5562
  }
5555
5563
  // Handle conflicts: if both providerName and model specify different providers
5556
5564
  if (model && providerName !== DEFAULT.PROVIDER.NAME) {