@voicethere/agent 0.14.1 → 0.15.0
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/llm/catalog.d.ts.map +1 -1
- package/dist/llm/catalog.js +3 -0
- package/dist/llm/catalog.js.map +1 -1
- package/dist/templates/llm-agent/agent.js +6 -3
- package/eject/llm/loop.ts +1 -1
- package/package.json +2 -1
- package/templates/llm-agent/README.md +2 -2
- package/templates/llm-agent/agent.ts +3 -2
- package/templates/llm-agent/voicethere.llm.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../src/llm/catalog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAElE,eAAO,MAAM,aAAa,EAAE,MAAM,CAChC,aAAa,EACb;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../src/llm/catalog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAElE,eAAO,MAAM,aAAa,EAAE,MAAM,CAChC,aAAa,EACb;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CA2B7E,CAAC;AAEF,wBAAgB,YAAY,CAAC,QAAQ,EAAE,aAAa,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAS5E"}
|
package/dist/llm/catalog.js
CHANGED
|
@@ -19,6 +19,9 @@ export const LLM_PROVIDERS = {
|
|
|
19
19
|
},
|
|
20
20
|
openrouter: {
|
|
21
21
|
title: "OpenRouter",
|
|
22
|
+
// Chosen by the 2026-10-27 probe: tool calls 3/3, median first token 438 ms.
|
|
23
|
+
// A paid model; the free `:free` models were rate-limited or returned no content.
|
|
24
|
+
defaultModel: "amazon/nova-micro-v1",
|
|
22
25
|
apiKeyEnv: "AGENT_OPENROUTER_API_KEY",
|
|
23
26
|
docsUrl: "https://openrouter.ai/docs/api-reference/overview",
|
|
24
27
|
},
|
package/dist/llm/catalog.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalog.js","sourceRoot":"","sources":["../../src/llm/catalog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAsB,MAAM,YAAY,CAAC;AAElE,MAAM,CAAC,MAAM,aAAa,GAGtB;IACF,MAAM,EAAE;QACN,KAAK,EAAE,QAAQ;QACf,YAAY,EAAE,aAAa;QAC3B,SAAS,EAAE,sBAAsB;QACjC,OAAO,EAAE,qDAAqD;KAC/D;IACD,SAAS,EAAE;QACT,KAAK,EAAE,WAAW;QAClB,YAAY,EAAE,kBAAkB;QAChC,SAAS,EAAE,yBAAyB;QACpC,OAAO,EAAE,4CAA4C;KACtD;IACD,MAAM,EAAE;QACN,KAAK,EAAE,eAAe;QACtB,SAAS,EAAE,sBAAsB;QACjC,OAAO,EAAE,uCAAuC;KACjD;IACD,UAAU,EAAE;QACV,KAAK,EAAE,YAAY;QACnB,SAAS,EAAE,0BAA0B;QACrC,OAAO,EAAE,mDAAmD;KAC7D;CACF,CAAC;AAEF,MAAM,UAAU,YAAY,CAAC,QAAuB,EAAE,KAAc;IAClE,MAAM,MAAM,GAAG,KAAK,EAAE,IAAI,EAAE,CAAC;IAC7B,IAAI,MAAM;QAAE,OAAO,MAAM,CAAC;IAC1B,MAAM,KAAK,GAAG,aAAa,CAAC,QAAQ,CAAC,CAAC;IACtC,IAAI,KAAK,CAAC,YAAY;QAAE,OAAO,KAAK,CAAC,YAAY,CAAC;IAClD,MAAM,IAAI,gBAAgB,CACxB,iBAAiB,EACjB,yBAAyB,KAAK,CAAC,KAAK,EAAE,CACvC,CAAC;AACJ,CAAC"}
|
|
1
|
+
{"version":3,"file":"catalog.js","sourceRoot":"","sources":["../../src/llm/catalog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAsB,MAAM,YAAY,CAAC;AAElE,MAAM,CAAC,MAAM,aAAa,GAGtB;IACF,MAAM,EAAE;QACN,KAAK,EAAE,QAAQ;QACf,YAAY,EAAE,aAAa;QAC3B,SAAS,EAAE,sBAAsB;QACjC,OAAO,EAAE,qDAAqD;KAC/D;IACD,SAAS,EAAE;QACT,KAAK,EAAE,WAAW;QAClB,YAAY,EAAE,kBAAkB;QAChC,SAAS,EAAE,yBAAyB;QACpC,OAAO,EAAE,4CAA4C;KACtD;IACD,MAAM,EAAE;QACN,KAAK,EAAE,eAAe;QACtB,SAAS,EAAE,sBAAsB;QACjC,OAAO,EAAE,uCAAuC;KACjD;IACD,UAAU,EAAE;QACV,KAAK,EAAE,YAAY;QACnB,6EAA6E;QAC7E,kFAAkF;QAClF,YAAY,EAAE,sBAAsB;QACpC,SAAS,EAAE,0BAA0B;QACrC,OAAO,EAAE,mDAAmD;KAC7D;CACF,CAAC;AAEF,MAAM,UAAU,YAAY,CAAC,QAAuB,EAAE,KAAc;IAClE,MAAM,MAAM,GAAG,KAAK,EAAE,IAAI,EAAE,CAAC;IAC7B,IAAI,MAAM;QAAE,OAAO,MAAM,CAAC;IAC1B,MAAM,KAAK,GAAG,aAAa,CAAC,QAAQ,CAAC,CAAC;IACtC,IAAI,KAAK,CAAC,YAAY;QAAE,OAAO,KAAK,CAAC,YAAY,CAAC;IAClD,MAAM,IAAI,gBAAgB,CACxB,iBAAiB,EACjB,yBAAyB,KAAK,CAAC,KAAK,EAAE,CACvC,CAAC;AACJ,CAAC"}
|
|
@@ -21272,6 +21272,9 @@ var LLM_PROVIDERS = {
|
|
|
21272
21272
|
},
|
|
21273
21273
|
openrouter: {
|
|
21274
21274
|
title: "OpenRouter",
|
|
21275
|
+
// Chosen by the 2026-10-27 probe: tool calls 3/3, median first token 438 ms.
|
|
21276
|
+
// A paid model; the free `:free` models were rate-limited or returned no content.
|
|
21277
|
+
defaultModel: "amazon/nova-micro-v1",
|
|
21275
21278
|
apiKeyEnv: "AGENT_OPENROUTER_API_KEY",
|
|
21276
21279
|
docsUrl: "https://openrouter.ai/docs/api-reference/overview"
|
|
21277
21280
|
}
|
|
@@ -47008,9 +47011,9 @@ var openai = {
|
|
|
47008
47011
|
var voicethere_llm_default = {
|
|
47009
47012
|
$schema: "./node_modules/@voicethere/agent/schema/voicethere.llm.schema.json",
|
|
47010
47013
|
version: 1,
|
|
47011
|
-
provider: "
|
|
47012
|
-
model: "
|
|
47013
|
-
apiKeySecret: "
|
|
47014
|
+
provider: "openrouter",
|
|
47015
|
+
model: "amazon/nova-micro-v1",
|
|
47016
|
+
apiKeySecret: "AGENT_OPENROUTER_API_KEY",
|
|
47014
47017
|
maxOutputTokens: 300,
|
|
47015
47018
|
greeting: {
|
|
47016
47019
|
text: "Hi! How can I help you today?",
|
package/eject/llm/loop.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voicethere/agent",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0",
|
|
4
4
|
"description": "VoiceThere customer agent SDK — IPC types and runtime helpers for sandboxed child bundles",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -101,6 +101,7 @@
|
|
|
101
101
|
"typecheck": "tsc --noEmit -p tsconfig.json && tsc --noEmit -p tsconfig.test.json",
|
|
102
102
|
"test": "vitest run",
|
|
103
103
|
"test:ci": "npm run typecheck && npm run build && npm run test && node scripts/ci/verify-package-exports.mjs",
|
|
104
|
+
"check:openrouter-model": "node scripts/ci/check-openrouter-default-model.mjs",
|
|
104
105
|
"test:redis": "vitest run test/redis-lua.test.ts test/game-sync-redis-agent.test.ts",
|
|
105
106
|
"verify:local": "npm run build && node ./dist/cli.js verify --no-build --bundle ./dist/agent.js",
|
|
106
107
|
"verify:local:only": "node ./dist/cli.js verify --no-build --bundle ./dist/agent.js",
|
|
@@ -13,7 +13,7 @@ A voice and chat agent powered by an LLM, with custom tools and MCP servers. Sou
|
|
|
13
13
|
|
|
14
14
|
## Set the API key
|
|
15
15
|
|
|
16
|
-
The
|
|
16
|
+
The template starts on OpenRouter with the model `amazon/nova-micro-v1`. Create a key at openrouter.ai, add it as a project secret named `AGENT_OPENROUTER_API_KEY`, then deploy. For production, pick the model from OpenRouter's list yourself, checking cost, latency and tool support. The key is read by name from `apiKeySecret` in `voicethere.llm.json`; it is never stored in the file. Only project secrets whose names start with `AGENT_` reach the agent.
|
|
17
17
|
|
|
18
18
|
## Filler phrases
|
|
19
19
|
|
|
@@ -56,7 +56,7 @@ It is never added automatically.
|
|
|
56
56
|
|
|
57
57
|
## Switch providers
|
|
58
58
|
|
|
59
|
-
Change `provider`, `model` and `apiKeySecret` in `voicethere.llm.json`.
|
|
59
|
+
Change `provider`, `model` and `apiKeySecret` in `voicethere.llm.json`. To go back to OpenAI, use `provider: "openai"`, `model: "gpt-4o-mini"` and `AGENT_OPENAI_API_KEY`; no import changes. Other options are `anthropic` with `AGENT_ANTHROPIC_API_KEY` and `gemini` with `AGENT_GEMINI_API_KEY`. Create the matching project secret before you deploy.
|
|
60
60
|
|
|
61
61
|
## Switching provider
|
|
62
62
|
|
|
@@ -6,11 +6,12 @@ import systemPrompt from "./prompt.md";
|
|
|
6
6
|
import { tools } from "./tools";
|
|
7
7
|
import { hooks } from "./hooks";
|
|
8
8
|
|
|
9
|
-
//
|
|
9
|
+
// The template runs on OpenRouter, which is served by the openai module, so
|
|
10
|
+
// switching between openai and openrouter needs no import change. Only the
|
|
11
|
+
// provider you import here is bundled. To use another provider, change
|
|
10
12
|
// "provider" in voicethere.llm.json and import its module instead:
|
|
11
13
|
// anthropic → import { anthropic } from "@voicethere/agent/llm/anthropic";
|
|
12
14
|
// gemini → import { gemini } from "@voicethere/agent/llm/gemini";
|
|
13
|
-
// openrouter uses the openai module.
|
|
14
15
|
defineAgent(
|
|
15
16
|
createLlmAgent({ config, systemPrompt, tools, hooks, providers: [openai] }),
|
|
16
17
|
);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "./node_modules/@voicethere/agent/schema/voicethere.llm.schema.json",
|
|
3
3
|
"version": 1,
|
|
4
|
-
"provider": "
|
|
5
|
-
"model": "
|
|
6
|
-
"apiKeySecret": "
|
|
4
|
+
"provider": "openrouter",
|
|
5
|
+
"model": "amazon/nova-micro-v1",
|
|
6
|
+
"apiKeySecret": "AGENT_OPENROUTER_API_KEY",
|
|
7
7
|
"maxOutputTokens": 300,
|
|
8
8
|
"greeting": {
|
|
9
9
|
"text": "Hi! How can I help you today?",
|