@oya-ai/cli 1.0.79 → 1.0.81
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 +18 -4
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -470,7 +470,13 @@ var Oya = class {
|
|
|
470
470
|
await this.http.request("DELETE", `/api/personas/${id}/mfa`);
|
|
471
471
|
}
|
|
472
472
|
};
|
|
473
|
-
/**
|
|
473
|
+
/**
|
|
474
|
+
* This key's settings: LLM credentials, browser provider, solver.
|
|
475
|
+
*
|
|
476
|
+
* Bring your own LLM key (it pays for its own tokens, so no hourly chat quota applies):
|
|
477
|
+
* await oya.config.set({ llm_provider: 'gemini', openai_api_key: process.env.GEMINI_API_KEY });
|
|
478
|
+
* `llm_provider` is 'openai' | 'anthropic' | 'gemini'; `chat_model` overrides its default model.
|
|
479
|
+
*/
|
|
474
480
|
config = {
|
|
475
481
|
get: () => this.http.request("GET", "/api/config"),
|
|
476
482
|
set: (values) => this.http.request("POST", "/api/config", values)
|
|
@@ -933,7 +939,8 @@ function writeEnv(path, body) {
|
|
|
933
939
|
}
|
|
934
940
|
var LLM_PRESETS = {
|
|
935
941
|
anthropic: { base: "https://api.anthropic.com/v1", model: "claude-sonnet-4-5", label: "Anthropic (Claude)" },
|
|
936
|
-
openai: { base: "https://api.openai.com/v1", model: "gpt-4o-mini", label: "OpenAI" }
|
|
942
|
+
openai: { base: "https://api.openai.com/v1", model: "gpt-4o-mini", label: "OpenAI" },
|
|
943
|
+
gemini: { base: "https://generativelanguage.googleapis.com/v1beta/openai", model: "gemini-3.8-flash", label: "Gemini (Google)" }
|
|
937
944
|
};
|
|
938
945
|
async function askLlm() {
|
|
939
946
|
step("Agent LLM", "Drives `oya ask` and the chat API.");
|
|
@@ -941,6 +948,7 @@ async function askLlm() {
|
|
|
941
948
|
const provider = await choose("Which LLM should agents use?", [
|
|
942
949
|
{ id: "anthropic", label: "Anthropic (Claude)" },
|
|
943
950
|
{ id: "openai", label: "OpenAI" },
|
|
951
|
+
{ id: "gemini", label: "Gemini (Google)" },
|
|
944
952
|
{ id: "compatible", label: "An OpenAI-compatible endpoint", note: "OpenRouter, Together, Groq, Azure" },
|
|
945
953
|
{ id: "local", label: "A local model", note: "Ollama, vLLM, LM Studio" },
|
|
946
954
|
{ id: "skip", label: "Skip", note: "no agent control; add it later with `oya config`" }
|
|
@@ -1567,14 +1575,20 @@ async function cmdInit(flags2) {
|
|
|
1567
1575
|
const llm = await choose("Which LLM should agents use?", [
|
|
1568
1576
|
{ id: "anthropic", label: "Claude (Anthropic)" },
|
|
1569
1577
|
{ id: "openai", label: "OpenAI" },
|
|
1578
|
+
{ id: "gemini", label: "Gemini (Google)" },
|
|
1570
1579
|
{ id: "skip", label: "Skip", note: current.has_openai_key ? "keep what is configured" : "no agent control" }
|
|
1571
1580
|
]);
|
|
1581
|
+
const presets = {
|
|
1582
|
+
anthropic: { name: "Anthropic", model: "claude-sonnet-4-5" },
|
|
1583
|
+
openai: { name: "OpenAI", model: "gpt-4o-mini" },
|
|
1584
|
+
gemini: { name: "Gemini", model: "gemini-3.8-flash" }
|
|
1585
|
+
};
|
|
1572
1586
|
const updates = {};
|
|
1573
1587
|
if (llm !== "skip") {
|
|
1574
1588
|
updates.llm_provider = llm;
|
|
1575
|
-
const key = await askSecret(`${llm
|
|
1589
|
+
const key = await askSecret(`${presets[llm].name} API key:`);
|
|
1576
1590
|
if (key) updates.openai_api_key = key;
|
|
1577
|
-
const model = await ask("Default model:", llm
|
|
1591
|
+
const model = await ask("Default model:", presets[llm].model);
|
|
1578
1592
|
if (model) updates.chat_model = model;
|
|
1579
1593
|
}
|
|
1580
1594
|
console.log("\n\u2500\u2500 2. Where your browsers run \u2500\u2500");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oya-ai/cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.81",
|
|
4
4
|
"description": "Command line for the Oya browser control plane.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://browser.getoya.ai",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"access": "public"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@oya-ai/browser": "1.0.
|
|
42
|
+
"@oya-ai/browser": "1.0.81",
|
|
43
43
|
"@types/node": "^20.19.43",
|
|
44
44
|
"tsup": "^8.0.0",
|
|
45
45
|
"typescript": "^5.4.0"
|