twinclaw 1.2.5 → 1.2.6
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/core/onboarding.js +24 -5
- package/package.json +1 -1
package/dist/core/onboarding.js
CHANGED
|
@@ -97,11 +97,29 @@ async function showModelStatus() {
|
|
|
97
97
|
}
|
|
98
98
|
async function setModel(modelArg) {
|
|
99
99
|
if (!modelArg) {
|
|
100
|
-
console.log('\nUsage: /model set <model
|
|
101
|
-
console.log('
|
|
102
|
-
console.log('
|
|
103
|
-
console.log(' /model set
|
|
104
|
-
console.log(' /model set
|
|
100
|
+
console.log('\nUsage: /model set <provider/model>');
|
|
101
|
+
console.log('\nValid providers: modal, groq, openrouter, google, github');
|
|
102
|
+
console.log('\nExamples:');
|
|
103
|
+
console.log(' /model set modal (your custom model)');
|
|
104
|
+
console.log(' /model set groq/qwen/qwen3-32b');
|
|
105
|
+
console.log(' /model set openrouter/meta-llama/llama-3.3-70b-instruct');
|
|
106
|
+
console.log(' /model set google/gemini-2.0-flash');
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
// Validate the model format
|
|
110
|
+
const validProviders = ['modal', 'groq', 'openrouter', 'google', 'github', 'anthropic'];
|
|
111
|
+
const modelLower = modelArg.toLowerCase();
|
|
112
|
+
// Check if it follows provider/model format
|
|
113
|
+
if (!modelLower.includes('/')) {
|
|
114
|
+
console.log('\n⚠️ Invalid format. Use: provider/model');
|
|
115
|
+
console.log('Example: /model set modal');
|
|
116
|
+
console.log('Valid providers: modal, groq, openrouter, google, github');
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
const [provider] = modelLower.split('/');
|
|
120
|
+
if (!validProviders.includes(provider)) {
|
|
121
|
+
console.log(`\n⚠️ Unknown provider: ${provider}`);
|
|
122
|
+
console.log('Valid providers: modal, groq, openrouter, google, github');
|
|
105
123
|
return;
|
|
106
124
|
}
|
|
107
125
|
try {
|
|
@@ -110,6 +128,7 @@ async function setModel(modelArg) {
|
|
|
110
128
|
config.models.primaryModel = modelArg;
|
|
111
129
|
await writeConfig(config);
|
|
112
130
|
console.log(`\n✅ Primary model set to: ${modelArg}\n`);
|
|
131
|
+
console.log('Note: Restart gateway for changes to take effect.');
|
|
113
132
|
}
|
|
114
133
|
catch (err) {
|
|
115
134
|
console.log('Error setting model:', err);
|