You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Fresh install: README SDK example fails on account: "researcher" before search (vapi-network 0.17.4, Linux, Node 24)
#129
Hi — I did a fresh-user test of vapi-network today: new directory, npm init -y, npm install vapi-network, then ran one README example exactly as written. I stopped before any paid call (my test wallet is unfunded; total spend $0), so the pay path itself is untested beyond inspect. Full commands and outputs are below.
Environment
OS: Ubuntu 24.04.5 LTS (Linux 7.0.0-44-generic x86_64, VM/container, no working libsecret keyring)
Node: v24.22.1, npm 10.9.4
Package: vapi-network@0.17.4 (npm view vapi-network version also shows 0.17.4; install took 2s, 1 package, zero runtime dependencies)
One environment caveat: this VM's DNS returns CGNAT proxy addresses (198.18.0.0/15) for external hosts, which the client's public-URL guard rejects. I note where that affected results and how I verified around it; the main finding below is independent of it.
What worked
npm install vapi-network and the CLI: vapi --help, vapi version --json → {"command":"version","version":"0.17.4"}.
vapi init --no-link --json after setting VAPI_VAULT_PASSWORD (the first attempt without it failed clearly: "This machine has no working keyring (the libsecret keyring). Set VAPI_VAULT_PASSWORD (at least 12 characters…)"). The recovery phrase stayed hidden, which I appreciated.
Search and inspect, once DNS returned public addresses (see caveat): vapi search "weather" returned ranked listings with ref URLs, prices and an "Inspect before paying" hint; vapi inspect https://apexfaucet.xyz/api/x402/dex-volumes returned the endpoint contract and a ready-to-copy pay hint.
The SDK docs namespace with no wallet at all, as docs/sdk.md promises: createVapiClient() then vapi.docs.search("spend caps", { limit: 5 }) returned real results before any init.
SDK search with the account a fresh init actually creates (main) returned 2 listings for "Base DEX volume".
The first thing that broke
The README's TypeScript example ("Call the same client from TypeScript"):
KeystoreError: No wallet yet. Run vapi init.
at _WalletStore.resolve (.../node_modules/vapi-network/dist/index.js:73572:13)
at createVapiClient (.../node_modules/vapi-network/dist/index.js:124461:50)
The README section doesn't say to run setup/init first, and the error says vapi init while the Quickstart says vapi setup, so I wasn't sure which one the example expected. I followed the error, ran init — and the example still failed, differently:
KeystoreError: No wallet named researcher. This machine has: main.
A fresh init creates the account named main. As far as I can tell, researcher comes from examples/agent-researcher.md (vapi agent create researcher), but the README SDK section never mentions creating it. So the example cannot run as written for a new user, even after following the CLI's own recovery advice.
Two follow-on problems in the same snippet, found by changing only the account name to main and stopping before the paid call:
The search works, but the pay line ignores the search result and hard-codes id: "base-dex-volume". That id doesn't resolve — the free check vapi inspect "base-dex-volume" --json returns {"error":"No payable endpoint found for service \"base-dex-volume\".","exitCode":1}. The actual search results carry ref URLs (e.g. https://apexfaucet.xyz/api/x402/dex-volumes, $0.002), and inspecting that ref works. (The docs/sdk.md spend-cap snippet has the same pattern with id: "weather", which also returns "No payable endpoint found".)
For TypeScript users: typechecking the snippet with tsc (no skipLibCheck) fails inside the package's own types — error TS2307: Cannot find module '@vapi-network/core' (and @vapi-network/cli, @vapi-network/mcp, @vapi-network/sources, @vapi-network/core/router-client) from dist/index.d.ts / dist/client.d.ts, because the published package.json has "dependencies": {} while the .d.ts files import the scoped packages. With --skipLibCheck it passes. My fresh npm init -y project also needed an ESM file (.mts) for the top-level await, which the snippet doesn't mention.
Second confusion: proxied DNS + a dead docs link
In this VM, vanilla vapi search "weather" first failed with:
URL hostname "api.vapinetwork.ai" is not allowed; private or internal destinations require allowPrivateNetwork true in the vAPI config.
Same for docs.vapinetwork.ai (SDK docs search) and mainnet.base.org (during init's balance lookup). I eventually found that docs/configuration.md covers exactly this 198.18.0.0/15 proxy-DNS case, and setting "allowPrivateNetwork": true in the generated ~/.vapi/config.json fixed search end-to-end. But the error message doesn't name the config path or link that page, the troubleshooting table has no row for this message, and creating a minimal config.json with only that field fails validation (discoveryUrl, networks, spendCaps are required in the file, despite the docs table saying they "default to" values). Relatedly, the README tells Linux server/container users to read "Linux without a keyring" at ./docs/wallets.md#linux-without-a-keyring before setup — but the README shipped in the npm tarball links to 32 files that aren't in the tarball (all ./docs/*.md, ./examples, ./CHANGELOG.md, …; only ./LICENSE resolves), so that link is dead for anyone reading the installed package.
One concrete suggestion
Make the README/docs SDK example runnable end-to-end for a fresh user, e.g.:
import{createVapiClient}from"vapi-network";// Needs a local wallet first: run `vapi setup` (or `vapi init`) once.// With no `account`, the client uses your default account.constvapi=awaitcreateVapiClient();const[listing]=awaitvapi.call.search("Base DEX volume")asArray<{ref: string}>;awaitvapi.call.inspect(listing.ref);// free; check the contract before payingconstresult=awaitvapi.call.pay({id: listing.ref,maxPriceUsd: 0.05});console.log(result.body);
That removes the phantom researcher account and the unresolvable base-dex-volume id, and models the inspect-before-pay flow the CLI hints already teach. (If researcher is intentional, one line — "create it first with vapi agent create researcher …, see the agents guide" — would fix the confusion too.)
Happy to retest a fixed snippet. Thanks for building this — search/inspect/docs all felt solid once I got past the example.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Hi — I did a fresh-user test of
vapi-networktoday: new directory,npm init -y,npm install vapi-network, then ran one README example exactly as written. I stopped before any paid call (my test wallet is unfunded; total spend $0), so the pay path itself is untested beyondinspect. Full commands and outputs are below.Environment
vapi-network@0.17.4(npm view vapi-network versionalso shows 0.17.4; install took 2s, 1 package, zero runtime dependencies)What worked
npm install vapi-networkand the CLI:vapi --help,vapi version --json→{"command":"version","version":"0.17.4"}.vapi init --no-link --jsonafter settingVAPI_VAULT_PASSWORD(the first attempt without it failed clearly: "This machine has no working keyring (the libsecret keyring). Set VAPI_VAULT_PASSWORD (at least 12 characters…)"). The recovery phrase stayed hidden, which I appreciated.vapi search "weather"returned ranked listings withrefURLs, prices and an "Inspect before paying" hint;vapi inspect https://apexfaucet.xyz/api/x402/dex-volumesreturned the endpoint contract and a ready-to-copy pay hint.docsnamespace with no wallet at all, as docs/sdk.md promises:createVapiClient()thenvapi.docs.search("spend caps", { limit: 5 })returned real results before any init.main) returned 2 listings for "Base DEX volume".The first thing that broke
The README's TypeScript example ("Call the same client from TypeScript"):
On a fresh machine it fails on line 3:
The README section doesn't say to run setup/init first, and the error says
vapi initwhile the Quickstart saysvapi setup, so I wasn't sure which one the example expected. I followed the error, ran init — and the example still failed, differently:A fresh init creates the account named
main. As far as I can tell,researchercomes fromexamples/agent-researcher.md(vapi agent create researcher), but the README SDK section never mentions creating it. So the example cannot run as written for a new user, even after following the CLI's own recovery advice.Two follow-on problems in the same snippet, found by changing only the account name to
mainand stopping before the paid call:id: "base-dex-volume". That id doesn't resolve — the free checkvapi inspect "base-dex-volume" --jsonreturns{"error":"No payable endpoint found for service \"base-dex-volume\".","exitCode":1}. The actual search results carryrefURLs (e.g.https://apexfaucet.xyz/api/x402/dex-volumes, $0.002), and inspecting that ref works. (The docs/sdk.md spend-cap snippet has the same pattern withid: "weather", which also returns "No payable endpoint found".)tsc(noskipLibCheck) fails inside the package's own types —error TS2307: Cannot find module '@vapi-network/core'(and@vapi-network/cli,@vapi-network/mcp,@vapi-network/sources,@vapi-network/core/router-client) fromdist/index.d.ts/dist/client.d.ts, because the publishedpackage.jsonhas"dependencies": {}while the.d.tsfiles import the scoped packages. With--skipLibCheckit passes. My freshnpm init -yproject also needed an ESM file (.mts) for the top-levelawait, which the snippet doesn't mention.Second confusion: proxied DNS + a dead docs link
In this VM, vanilla
vapi search "weather"first failed with:Same for
docs.vapinetwork.ai(SDK docs search) andmainnet.base.org(during init's balance lookup). I eventually found that docs/configuration.md covers exactly this 198.18.0.0/15 proxy-DNS case, and setting"allowPrivateNetwork": truein the generated~/.vapi/config.jsonfixed search end-to-end. But the error message doesn't name the config path or link that page, the troubleshooting table has no row for this message, and creating a minimalconfig.jsonwith only that field fails validation (discoveryUrl,networks,spendCapsare required in the file, despite the docs table saying they "default to" values). Relatedly, the README tells Linux server/container users to read "Linux without a keyring" at./docs/wallets.md#linux-without-a-keyringbefore setup — but the README shipped in the npm tarball links to 32 files that aren't in the tarball (all./docs/*.md,./examples,./CHANGELOG.md, …; only./LICENSEresolves), so that link is dead for anyone reading the installed package.One concrete suggestion
Make the README/docs SDK example runnable end-to-end for a fresh user, e.g.:
That removes the phantom
researcheraccount and the unresolvablebase-dex-volumeid, and models the inspect-before-pay flow the CLI hints already teach. (Ifresearcheris intentional, one line — "create it first withvapi agent create researcher …, see the agents guide" — would fix the confusion too.)Happy to retest a fixed snippet. Thanks for building this — search/inspect/docs all felt solid once I got past the example.
All reactions