code-graph-builder 0.3.1 → 0.4.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/bin/cli.mjs +7 -5
- package/package.json +1 -1
package/bin/cli.mjs
CHANGED
|
@@ -122,8 +122,9 @@ async function runSetup() {
|
|
|
122
122
|
log(" 2) OpenAI https://platform.openai.com");
|
|
123
123
|
log(" 3) DeepSeek https://platform.deepseek.com");
|
|
124
124
|
log(" 4) OpenRouter https://openrouter.ai");
|
|
125
|
-
log(" 5)
|
|
126
|
-
log(" 6)
|
|
125
|
+
log(" 5) LiteLLM Proxy (OpenAI-compatible gateway)");
|
|
126
|
+
log(" 6) Custom (any OpenAI-compatible endpoint)");
|
|
127
|
+
log(" 7) Skip (configure later)");
|
|
127
128
|
log("");
|
|
128
129
|
|
|
129
130
|
const providers = {
|
|
@@ -131,19 +132,20 @@ async function runSetup() {
|
|
|
131
132
|
"2": { name: "OpenAI", url: "https://api.openai.com/v1", model: "gpt-4o" },
|
|
132
133
|
"3": { name: "DeepSeek", url: "https://api.deepseek.com/v1", model: "deepseek-chat" },
|
|
133
134
|
"4": { name: "OpenRouter", url: "https://openrouter.ai/api/v1", model: "anthropic/claude-sonnet-4" },
|
|
135
|
+
"5": { name: "LiteLLM", url: "http://localhost:4000/v1", model: "gpt-4o" },
|
|
134
136
|
};
|
|
135
137
|
|
|
136
138
|
if (existing.LLM_API_KEY) {
|
|
137
139
|
log(` Current: ${mask(existing.LLM_API_KEY)} → ${existing.LLM_BASE_URL || "?"}`);
|
|
138
140
|
}
|
|
139
141
|
|
|
140
|
-
const choice = (await ask(" Choose provider [1-
|
|
142
|
+
const choice = (await ask(" Choose provider [1-7]: ")).trim() || "7";
|
|
141
143
|
|
|
142
144
|
let llmKey = existing.LLM_API_KEY || "";
|
|
143
145
|
let llmBaseUrl = existing.LLM_BASE_URL || "";
|
|
144
146
|
let llmModel = existing.LLM_MODEL || "";
|
|
145
147
|
|
|
146
|
-
if (choice !== "
|
|
148
|
+
if (choice !== "7") {
|
|
147
149
|
const provider = providers[choice];
|
|
148
150
|
|
|
149
151
|
if (provider) {
|
|
@@ -151,7 +153,7 @@ async function runSetup() {
|
|
|
151
153
|
llmBaseUrl = provider.url;
|
|
152
154
|
llmModel = provider.model;
|
|
153
155
|
} else {
|
|
154
|
-
// Choice "
|
|
156
|
+
// Choice "6" or invalid → custom
|
|
155
157
|
log("\n → Custom provider");
|
|
156
158
|
llmBaseUrl = (await ask(" API Base URL: ")).trim() || llmBaseUrl;
|
|
157
159
|
llmModel = (await ask(" Model name: ")).trim() || llmModel || "gpt-4o";
|