zefiro 0.3.0 → 0.3.2

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/dist/cli.js CHANGED
@@ -191250,8 +191250,19 @@ var DEFAULT_MODELS = {
191250
191250
  anthropic: "claude-sonnet-4-20250514"
191251
191251
  };
191252
191252
  var MAX_RETRIES = 2;
191253
+ function isCompatibleModel(provider, model) {
191254
+ if (provider === "openai")
191255
+ return !model.startsWith("claude-");
191256
+ if (provider === "anthropic")
191257
+ return !model.startsWith("gpt-") && !model.startsWith("o1") && !model.startsWith("o3");
191258
+ return true;
191259
+ }
191253
191260
  async function callLLM(request) {
191254
- const model = request.model ?? DEFAULT_MODELS[request.provider];
191261
+ const agentModel = request.model && isCompatibleModel(request.provider, request.model) ? request.model : undefined;
191262
+ if (request.model && !agentModel) {
191263
+ warn(`Model "${request.model}" is not compatible with provider "${request.provider}", using default`);
191264
+ }
191265
+ const model = agentModel ?? DEFAULT_MODELS[request.provider];
191255
191266
  for (let attempt = 0;attempt <= MAX_RETRIES; attempt++) {
191256
191267
  try {
191257
191268
  if (request.provider === "openai") {
@@ -203150,7 +203161,7 @@ var hasFlags = userArgs.some((a) => a.startsWith("-"));
203150
203161
  var cols = process.stdout.columns || 80;
203151
203162
  var rows = process.stdout.rows || 24;
203152
203163
  if (!hasCommand && !hasFlags && process.stdout.isTTY && cols >= 60 && rows >= 20) {
203153
- const { launchTui } = await import("./App-d0tbxdwk.js");
203164
+ const { launchTui } = await import("./App-cnkt857g.js");
203154
203165
  await launchTui(program2);
203155
203166
  } else {
203156
203167
  program2.parse();