openads-ai 0.1.0 → 0.1.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.
- package/dist/cli.js +1 -7
- package/dist/setup.js +21 -12
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -29,13 +29,7 @@ const openadsGradient = gradient(['#00d2ff', '#3a7bd5', '#00d2ff']);
|
|
|
29
29
|
const CONFIG_DIR = path.join(os.homedir(), '.openads');
|
|
30
30
|
const CONFIG_PATH = path.join(CONFIG_DIR, 'openads.config.json');
|
|
31
31
|
const DEPRECATED_MODELS = {
|
|
32
|
-
'google/gemini-1.
|
|
33
|
-
'google/gemini-1.5-pro-latest': 'google/gemini-2.5-flash',
|
|
34
|
-
'google/gemini-3.5-flash': 'google/gemini-2.5-flash',
|
|
35
|
-
'openai/gpt-4o': 'openai/gpt-4.1',
|
|
36
|
-
'openai/gpt-4o-mini': 'openai/gpt-4.1-mini',
|
|
37
|
-
'anthropic/claude-3-5-sonnet-20241022': 'anthropic/claude-sonnet-4',
|
|
38
|
-
'anthropic/claude-3-5-haiku-20241022': 'anthropic/claude-haiku-4',
|
|
32
|
+
'google/gemini-1.0-pro': 'google/gemini-2.5-flash',
|
|
39
33
|
};
|
|
40
34
|
function loadConfig() {
|
|
41
35
|
if (!fs.existsSync(CONFIG_PATH))
|
package/dist/setup.js
CHANGED
|
@@ -64,12 +64,16 @@ export async function runSetup() {
|
|
|
64
64
|
let selectedModel = '';
|
|
65
65
|
if (provider === 'google') {
|
|
66
66
|
const googleChoices = [
|
|
67
|
-
{ name: 'google/gemini-
|
|
68
|
-
{ name: 'google/gemini-
|
|
67
|
+
{ name: 'google/gemini-3.5-flash', message: 'Gemini 3.5 Flash (Cutting Edge — High-speed flagship)' },
|
|
68
|
+
{ name: 'google/gemini-3.5-pro', message: 'Gemini 3.5 Pro (Reasoning Frontier — Ultimate capabilities)' },
|
|
69
|
+
{ name: 'google/gemini-2.5-flash', message: 'Gemini 2.5 Flash (Fast, smart & cost-effective)' },
|
|
70
|
+
{ name: 'google/gemini-2.5-pro', message: 'Gemini 2.5 Pro (Best reasoning, huge context)' },
|
|
71
|
+
{ name: 'google/gemini-1.5-flash', message: 'Gemini 1.5 Flash (Reliable legacy lightweight)' },
|
|
72
|
+
{ name: 'google/gemini-1.5-pro', message: 'Gemini 1.5 Pro (Reliable legacy standard)' }
|
|
69
73
|
];
|
|
70
|
-
let initialIndex =
|
|
71
|
-
if (
|
|
72
|
-
initialIndex =
|
|
74
|
+
let initialIndex = googleChoices.findIndex(c => c.name === existingConfig.provider);
|
|
75
|
+
if (initialIndex === -1)
|
|
76
|
+
initialIndex = 0;
|
|
73
77
|
let { model } = await enquirer.prompt({
|
|
74
78
|
type: 'select',
|
|
75
79
|
name: 'model',
|
|
@@ -81,12 +85,14 @@ export async function runSetup() {
|
|
|
81
85
|
}
|
|
82
86
|
else if (provider === 'openai') {
|
|
83
87
|
const openaiChoices = [
|
|
88
|
+
{ name: 'openai/gpt-4o', message: 'GPT-4o (Omni — Dynamic reasoning & vision)' },
|
|
89
|
+
{ name: 'openai/gpt-4o-mini', message: 'GPT-4o Mini (Omni Mini — Fast & affordable)' },
|
|
84
90
|
{ name: 'openai/gpt-4.1', message: 'GPT-4.1 (Recommended — Excellent instruction following)' },
|
|
85
91
|
{ name: 'openai/gpt-4.1-mini', message: 'GPT-4.1 Mini (Lightweight — Fast and budget-friendly)' }
|
|
86
92
|
];
|
|
87
|
-
let initialIndex =
|
|
88
|
-
if (
|
|
89
|
-
initialIndex =
|
|
93
|
+
let initialIndex = openaiChoices.findIndex(c => c.name === existingConfig.provider);
|
|
94
|
+
if (initialIndex === -1)
|
|
95
|
+
initialIndex = 2;
|
|
90
96
|
let { model } = await enquirer.prompt({
|
|
91
97
|
type: 'select',
|
|
92
98
|
name: 'model',
|
|
@@ -99,11 +105,14 @@ export async function runSetup() {
|
|
|
99
105
|
else if (provider === 'anthropic') {
|
|
100
106
|
const anthropicChoices = [
|
|
101
107
|
{ name: 'anthropic/claude-sonnet-4', message: 'Claude Sonnet 4 (Recommended — Outstanding reasoning)' },
|
|
102
|
-
{ name: 'anthropic/claude-haiku-4', message: 'Claude Haiku 4 (Lightweight — Fast & responsive)' }
|
|
108
|
+
{ name: 'anthropic/claude-haiku-4', message: 'Claude Haiku 4 (Lightweight — Fast & responsive)' },
|
|
109
|
+
{ name: 'anthropic/claude-3-5-sonnet', message: 'Claude 3.5 Sonnet (Highly popular and smart)' },
|
|
110
|
+
{ name: 'anthropic/claude-3-5-haiku', message: 'Claude 3.5 Haiku (Fast & cost-efficient)' },
|
|
111
|
+
{ name: 'anthropic/claude-3-opus', message: 'Claude 3 Opus (Deep creative reasoning)' }
|
|
103
112
|
];
|
|
104
|
-
let initialIndex =
|
|
105
|
-
if (
|
|
106
|
-
initialIndex =
|
|
113
|
+
let initialIndex = anthropicChoices.findIndex(c => c.name === existingConfig.provider);
|
|
114
|
+
if (initialIndex === -1)
|
|
115
|
+
initialIndex = 0;
|
|
107
116
|
let { model } = await enquirer.prompt({
|
|
108
117
|
type: 'select',
|
|
109
118
|
name: 'model',
|
package/package.json
CHANGED