gityo 1.0.0 → 1.0.1

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 (2) hide show
  1. package/dist/index.js +5 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -167614,7 +167614,7 @@ const SUPPORTED_PROVIDERS = {
167614
167614
  "zhipu-ai-provider": createZhipu
167615
167615
  };
167616
167616
  const modelSchema = object$4({
167617
- npm: _enum$4(Object.keys(SUPPORTED_PROVIDERS)).default("@ai-sdk/openai-compatible"),
167617
+ npm: _enum$4(Object.keys(SUPPORTED_PROVIDERS)).optional(),
167618
167618
  apiKeyEnv: union$4([string$6().min(1), array$4(string$6().min(1))]),
167619
167619
  model: string$6().min(1),
167620
167620
  apiUrl: url$3().optional(),
@@ -172830,9 +172830,10 @@ function resolveLanguageModel(modelConfig) {
172830
172830
  }
172831
172831
  }
172832
172832
  if (apiKey === null) throw new Error(`No API key found. Set 'apiKeyEnv' in your config to the environment variable holding the key for '${modelConfig.model}'.`);
172833
- if (modelConfig.npm === "@ai-sdk/openai-compatible" && !modelConfig.apiUrl) throw new Error("apiUrl is required for openai-compatible provider");
172834
- return SUPPORTED_PROVIDERS[modelConfig.npm]({
172835
- name: modelConfig.npm,
172833
+ const npm = modelConfig.npm ?? "@ai-sdk/openai-compatible";
172834
+ if (npm === "@ai-sdk/openai-compatible" && !modelConfig.apiUrl) throw new Error("apiUrl is required for openai-compatible provider");
172835
+ return SUPPORTED_PROVIDERS[npm]({
172836
+ name: npm,
172836
172837
  apiKey,
172837
172838
  baseURL: modelConfig.apiUrl,
172838
172839
  ...modelConfig.options
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gityo",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "sideEffects": false,
5
5
  "type": "module",
6
6
  "scripts": {