aieo 0.1.21 → 0.1.22

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/index.js CHANGED
@@ -8170,18 +8170,23 @@ async function getModel(provider, apiKey, cwd) {
8170
8170
  });
8171
8171
  return openai2(SOTA[provider]);
8172
8172
  case "claude_code":
8173
- const customProvider = createClaudeCode({
8174
- defaultSettings: {
8175
- // Skip permission prompts for all operations
8176
- permissionMode: "bypassPermissions",
8177
- // Set working directory for file operations
8178
- cwd
8173
+ try {
8174
+ const customProvider = createClaudeCode({
8175
+ defaultSettings: {
8176
+ // Skip permission prompts for all operations
8177
+ permissionMode: "bypassPermissions",
8178
+ // Set working directory for file operations
8179
+ cwd
8180
+ }
8181
+ });
8182
+ if (cwd) {
8183
+ console.log("creating claude code model at", cwd);
8179
8184
  }
8180
- });
8181
- if (cwd) {
8182
- console.log("creating claude code model at", cwd);
8185
+ return customProvider(SOTA[provider]);
8186
+ } catch (error) {
8187
+ console.error("Failed to create Claude Code provider:", error);
8188
+ throw new Error("Claude Code CLI not available or not properly installed. Make sure Claude Code is installed and accessible in the environment where this code runs.");
8183
8189
  }
8184
- return customProvider(SOTA[provider]);
8185
8190
  default:
8186
8191
  throw new Error(`Unsupported provider: ${provider}`);
8187
8192
  }