@orchagent/cli 0.3.18 → 0.3.20

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.
@@ -209,7 +209,27 @@ argument or --file option instead.
209
209
  }
210
210
  else {
211
211
  // Try to detect from environment or server
212
- const detected = await (0, llm_1.detectLlmKey)(supportedProviders, resolved);
212
+ // If --provider specified, prioritize that provider
213
+ let providersToCheck = supportedProviders;
214
+ if (options.provider) {
215
+ (0, llm_1.validateProvider)(options.provider);
216
+ providersToCheck = [options.provider];
217
+ // Warn on potential model/provider mismatch
218
+ if (options.model) {
219
+ const modelLower = options.model.toLowerCase();
220
+ const providerPatterns = {
221
+ openai: /^(gpt-|o1-|o3-|davinci|text-)/,
222
+ anthropic: /^claude-/,
223
+ gemini: /^gemini-/,
224
+ ollama: /^(llama|mistral|deepseek|phi|qwen)/,
225
+ };
226
+ const expectedPattern = providerPatterns[options.provider];
227
+ if (expectedPattern && !expectedPattern.test(modelLower)) {
228
+ process.stderr.write(`Warning: Model '${options.model}' may not be a ${options.provider} model.\n\n`);
229
+ }
230
+ }
231
+ }
232
+ const detected = await (0, llm_1.detectLlmKey)(providersToCheck, resolved);
213
233
  if (detected) {
214
234
  llmKey = detected.key;
215
235
  llmProvider = detected.provider;
@@ -227,8 +247,9 @@ argument or --file option instead.
227
247
  }
228
248
  else if (agentMeta.type === 'prompt') {
229
249
  // Warn if no key found for prompt-based agent
230
- const providerList = supportedProviders.join(', ');
231
- process.stderr.write(`Warning: No LLM key found for providers: ${providerList}\n` +
250
+ const searchedProviders = options.provider ? [options.provider] : supportedProviders;
251
+ const providerList = searchedProviders.join(', ');
252
+ process.stderr.write(`Warning: No LLM key found for provider(s): ${providerList}\n` +
232
253
  `Set an env var (e.g., OPENAI_API_KEY), run 'orchagent keys add <provider>', use --key, or configure in web dashboard\n\n`);
233
254
  }
234
255
  // Add skill headers
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orchagent/cli",
3
- "version": "0.3.18",
3
+ "version": "0.3.20",
4
4
  "description": "Command-line interface for the orchagent AI agent marketplace",
5
5
  "license": "MIT",
6
6
  "author": "orchagent <hello@orchagent.io>",