aigetwey 1.3.9 → 1.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/CHANGELOG.md +41 -0
- package/README.md +125 -211
- package/assets/screenshot-accesskey.png +0 -0
- package/assets/screenshot-budgets.png +0 -0
- package/assets/screenshot-endpoint.png +0 -0
- package/dashboard/.next/BUILD_ID +1 -1
- package/dashboard/.next/app-path-routes-manifest.json +1 -0
- package/dashboard/.next/build-manifest.json +3 -3
- package/dashboard/.next/diagnostics/route-bundle-stats.json +55 -38
- package/dashboard/.next/fallback-build-manifest.json +3 -3
- package/dashboard/.next/prerender-manifest.json +24 -0
- package/dashboard/.next/routes-manifest.json +6 -0
- package/dashboard/.next/server/app/(console)/combos/page.js.nft.json +1 -1
- package/dashboard/.next/server/app/(console)/combos/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/server/app/(console)/config/page.js.nft.json +1 -1
- package/dashboard/.next/server/app/(console)/config/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/server/app/(console)/console/page.js.nft.json +1 -1
- package/dashboard/.next/server/app/(console)/console/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/server/app/(console)/endpoint/page.js.nft.json +1 -1
- package/dashboard/.next/server/app/(console)/endpoint/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/server/app/(console)/keys/page/app-paths-manifest.json +3 -0
- package/dashboard/.next/server/app/(console)/keys/page/build-manifest.json +18 -0
- package/dashboard/.next/server/app/(console)/keys/page/next-font-manifest.json +11 -0
- package/dashboard/.next/server/app/(console)/keys/page/react-loadable-manifest.json +1 -0
- package/dashboard/.next/server/app/(console)/keys/page/server-reference-manifest.json +4 -0
- package/dashboard/.next/server/app/(console)/keys/page.js +15 -0
- package/dashboard/.next/server/app/(console)/keys/page.js.map +5 -0
- package/dashboard/.next/server/app/(console)/keys/page.js.nft.json +1 -0
- package/dashboard/.next/server/app/(console)/keys/page_client-reference-manifest.js +3 -0
- package/dashboard/.next/server/app/(console)/page.js.nft.json +1 -1
- package/dashboard/.next/server/app/(console)/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/server/app/(console)/providers/[id]/page.js.nft.json +1 -1
- package/dashboard/.next/server/app/(console)/providers/[id]/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/server/app/(console)/providers/page.js.nft.json +1 -1
- package/dashboard/.next/server/app/(console)/providers/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/server/app/(console)/quota/page.js.nft.json +1 -1
- package/dashboard/.next/server/app/(console)/quota/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/server/app/(console)/tools/[id]/page.js.nft.json +1 -1
- package/dashboard/.next/server/app/(console)/tools/[id]/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/server/app/(console)/tools/page.js.nft.json +1 -1
- package/dashboard/.next/server/app/(console)/tools/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/server/app/(console)/usage/page.js.nft.json +1 -1
- package/dashboard/.next/server/app/(console)/usage/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/dashboard/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/server/app/_global-error.html +1 -1
- package/dashboard/.next/server/app/_global-error.rsc +1 -1
- package/dashboard/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/dashboard/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/dashboard/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/dashboard/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/dashboard/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/dashboard/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/dashboard/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/server/app/_not-found.html +1 -1
- package/dashboard/.next/server/app/_not-found.rsc +2 -2
- package/dashboard/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/dashboard/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/dashboard/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
- package/dashboard/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/dashboard/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/dashboard/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/dashboard/.next/server/app/combos.html +1 -1
- package/dashboard/.next/server/app/combos.rsc +5 -5
- package/dashboard/.next/server/app/combos.segments/!KGNvbnNvbGUp/combos/__PAGE__.segment.rsc +2 -2
- package/dashboard/.next/server/app/combos.segments/!KGNvbnNvbGUp/combos.segment.rsc +1 -1
- package/dashboard/.next/server/app/combos.segments/!KGNvbnNvbGUp.segment.rsc +3 -3
- package/dashboard/.next/server/app/combos.segments/_full.segment.rsc +5 -5
- package/dashboard/.next/server/app/combos.segments/_head.segment.rsc +1 -1
- package/dashboard/.next/server/app/combos.segments/_index.segment.rsc +2 -2
- package/dashboard/.next/server/app/combos.segments/_tree.segment.rsc +2 -2
- package/dashboard/.next/server/app/config.html +1 -1
- package/dashboard/.next/server/app/config.rsc +5 -5
- package/dashboard/.next/server/app/config.segments/!KGNvbnNvbGUp/config/__PAGE__.segment.rsc +2 -2
- package/dashboard/.next/server/app/config.segments/!KGNvbnNvbGUp/config.segment.rsc +1 -1
- package/dashboard/.next/server/app/config.segments/!KGNvbnNvbGUp.segment.rsc +3 -3
- package/dashboard/.next/server/app/config.segments/_full.segment.rsc +5 -5
- package/dashboard/.next/server/app/config.segments/_head.segment.rsc +1 -1
- package/dashboard/.next/server/app/config.segments/_index.segment.rsc +2 -2
- package/dashboard/.next/server/app/config.segments/_tree.segment.rsc +2 -2
- package/dashboard/.next/server/app/console.html +1 -1
- package/dashboard/.next/server/app/console.rsc +5 -5
- package/dashboard/.next/server/app/console.segments/!KGNvbnNvbGUp/console/__PAGE__.segment.rsc +2 -2
- package/dashboard/.next/server/app/console.segments/!KGNvbnNvbGUp/console.segment.rsc +1 -1
- package/dashboard/.next/server/app/console.segments/!KGNvbnNvbGUp.segment.rsc +3 -3
- package/dashboard/.next/server/app/console.segments/_full.segment.rsc +5 -5
- package/dashboard/.next/server/app/console.segments/_head.segment.rsc +1 -1
- package/dashboard/.next/server/app/console.segments/_index.segment.rsc +2 -2
- package/dashboard/.next/server/app/console.segments/_tree.segment.rsc +2 -2
- package/dashboard/.next/server/app/endpoint.html +1 -1
- package/dashboard/.next/server/app/endpoint.rsc +5 -5
- package/dashboard/.next/server/app/endpoint.segments/!KGNvbnNvbGUp/endpoint/__PAGE__.segment.rsc +2 -2
- package/dashboard/.next/server/app/endpoint.segments/!KGNvbnNvbGUp/endpoint.segment.rsc +1 -1
- package/dashboard/.next/server/app/endpoint.segments/!KGNvbnNvbGUp.segment.rsc +3 -3
- package/dashboard/.next/server/app/endpoint.segments/_full.segment.rsc +5 -5
- package/dashboard/.next/server/app/endpoint.segments/_head.segment.rsc +1 -1
- package/dashboard/.next/server/app/endpoint.segments/_index.segment.rsc +2 -2
- package/dashboard/.next/server/app/endpoint.segments/_tree.segment.rsc +2 -2
- package/dashboard/.next/server/app/index.html +1 -1
- package/dashboard/.next/server/app/index.rsc +5 -5
- package/dashboard/.next/server/app/index.segments/!KGNvbnNvbGUp/__PAGE__.segment.rsc +2 -2
- package/dashboard/.next/server/app/index.segments/!KGNvbnNvbGUp.segment.rsc +3 -3
- package/dashboard/.next/server/app/index.segments/_full.segment.rsc +5 -5
- package/dashboard/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/dashboard/.next/server/app/index.segments/_index.segment.rsc +2 -2
- package/dashboard/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/dashboard/.next/server/app/keys.html +1 -0
- package/dashboard/.next/server/app/keys.meta +16 -0
- package/dashboard/.next/server/app/keys.rsc +25 -0
- package/dashboard/.next/server/app/keys.segments/!KGNvbnNvbGUp/keys/__PAGE__.segment.rsc +6 -0
- package/dashboard/.next/server/app/keys.segments/!KGNvbnNvbGUp/keys.segment.rsc +5 -0
- package/dashboard/.next/server/app/keys.segments/!KGNvbnNvbGUp.segment.rsc +6 -0
- package/dashboard/.next/server/app/keys.segments/_full.segment.rsc +25 -0
- package/dashboard/.next/server/app/keys.segments/_head.segment.rsc +6 -0
- package/dashboard/.next/server/app/keys.segments/_index.segment.rsc +9 -0
- package/dashboard/.next/server/app/keys.segments/_tree.segment.rsc +5 -0
- package/dashboard/.next/server/app/login/page.js.nft.json +1 -1
- package/dashboard/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/server/app/login.html +1 -1
- package/dashboard/.next/server/app/login.rsc +2 -2
- package/dashboard/.next/server/app/login.segments/_full.segment.rsc +2 -2
- package/dashboard/.next/server/app/login.segments/_head.segment.rsc +1 -1
- package/dashboard/.next/server/app/login.segments/_index.segment.rsc +2 -2
- package/dashboard/.next/server/app/login.segments/_tree.segment.rsc +2 -2
- package/dashboard/.next/server/app/login.segments/login/__PAGE__.segment.rsc +1 -1
- package/dashboard/.next/server/app/login.segments/login.segment.rsc +1 -1
- package/dashboard/.next/server/app/providers.html +1 -1
- package/dashboard/.next/server/app/providers.rsc +5 -5
- package/dashboard/.next/server/app/providers.segments/!KGNvbnNvbGUp/providers/__PAGE__.segment.rsc +2 -2
- package/dashboard/.next/server/app/providers.segments/!KGNvbnNvbGUp/providers.segment.rsc +1 -1
- package/dashboard/.next/server/app/providers.segments/!KGNvbnNvbGUp.segment.rsc +3 -3
- package/dashboard/.next/server/app/providers.segments/_full.segment.rsc +5 -5
- package/dashboard/.next/server/app/providers.segments/_head.segment.rsc +1 -1
- package/dashboard/.next/server/app/providers.segments/_index.segment.rsc +2 -2
- package/dashboard/.next/server/app/providers.segments/_tree.segment.rsc +2 -2
- package/dashboard/.next/server/app/quota.html +1 -1
- package/dashboard/.next/server/app/quota.rsc +5 -5
- package/dashboard/.next/server/app/quota.segments/!KGNvbnNvbGUp/quota/__PAGE__.segment.rsc +2 -2
- package/dashboard/.next/server/app/quota.segments/!KGNvbnNvbGUp/quota.segment.rsc +1 -1
- package/dashboard/.next/server/app/quota.segments/!KGNvbnNvbGUp.segment.rsc +3 -3
- package/dashboard/.next/server/app/quota.segments/_full.segment.rsc +5 -5
- package/dashboard/.next/server/app/quota.segments/_head.segment.rsc +1 -1
- package/dashboard/.next/server/app/quota.segments/_index.segment.rsc +2 -2
- package/dashboard/.next/server/app/quota.segments/_tree.segment.rsc +2 -2
- package/dashboard/.next/server/app/tools.html +1 -1
- package/dashboard/.next/server/app/tools.rsc +5 -5
- package/dashboard/.next/server/app/tools.segments/!KGNvbnNvbGUp/tools/__PAGE__.segment.rsc +2 -2
- package/dashboard/.next/server/app/tools.segments/!KGNvbnNvbGUp/tools.segment.rsc +1 -1
- package/dashboard/.next/server/app/tools.segments/!KGNvbnNvbGUp.segment.rsc +3 -3
- package/dashboard/.next/server/app/tools.segments/_full.segment.rsc +5 -5
- package/dashboard/.next/server/app/tools.segments/_head.segment.rsc +1 -1
- package/dashboard/.next/server/app/tools.segments/_index.segment.rsc +2 -2
- package/dashboard/.next/server/app/tools.segments/_tree.segment.rsc +2 -2
- package/dashboard/.next/server/app-paths-manifest.json +1 -0
- package/dashboard/.next/server/chunks/[root-of-the-server]__0das32e._.js +1 -1
- package/dashboard/.next/server/chunks/[root-of-the-server]__0das32e._.js.map +1 -1
- package/dashboard/.next/server/chunks/ssr/[root-of-the-server]__006jvp_._.js +3 -0
- package/dashboard/.next/server/chunks/ssr/[root-of-the-server]__006jvp_._.js.map +1 -0
- package/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__0x-617o._.js → [root-of-the-server]__1eeunp8._.js} +2 -2
- package/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__0x-617o._.js.map → [root-of-the-server]__1eeunp8._.js.map} +1 -1
- package/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__09pxn-h._.js → [root-of-the-server]__1t7z0yw._.js} +2 -2
- package/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__09pxn-h._.js.map → [root-of-the-server]__1t7z0yw._.js.map} +1 -1
- package/dashboard/.next/server/chunks/ssr/_0p90gyy._.js +3 -0
- package/dashboard/.next/server/chunks/ssr/_0p90gyy._.js.map +1 -0
- package/dashboard/.next/server/chunks/ssr/_next-internal_server_app_(console)_keys_page_actions_1--ho2b.js +3 -0
- package/dashboard/.next/server/chunks/ssr/_next-internal_server_app_(console)_keys_page_actions_1--ho2b.js.map +1 -0
- package/dashboard/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0-auga4.js +4 -0
- package/dashboard/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0-auga4.js.map +1 -0
- package/dashboard/.next/server/chunks/ssr/src_13mfqac._.js +3 -0
- package/dashboard/.next/server/chunks/ssr/src_13mfqac._.js.map +1 -0
- package/dashboard/.next/server/chunks/ssr/src_16zsfd3._.js +3 -0
- package/dashboard/.next/server/chunks/ssr/src_16zsfd3._.js.map +1 -0
- package/dashboard/.next/server/chunks/ssr/src_components_0-kkrr9._.js +3 -0
- package/dashboard/.next/server/chunks/ssr/src_components_0-kkrr9._.js.map +1 -0
- package/dashboard/.next/server/chunks/ssr/src_components_0dgasfb._.js +3 -0
- package/dashboard/.next/server/chunks/ssr/src_components_0dgasfb._.js.map +1 -0
- package/dashboard/.next/server/chunks/ssr/src_components_0q5pldo._.js +3 -0
- package/dashboard/.next/server/chunks/ssr/src_components_0q5pldo._.js.map +1 -0
- package/dashboard/.next/server/chunks/ssr/src_components_11ckzq_._.js +1 -1
- package/dashboard/.next/server/chunks/ssr/src_components_11ckzq_._.js.map +1 -1
- package/dashboard/.next/server/chunks/ssr/src_components_11dtfns._.js +3 -0
- package/dashboard/.next/server/chunks/ssr/src_components_11dtfns._.js.map +1 -0
- package/dashboard/.next/server/chunks/ssr/src_components_1e6kjgr._.js +3 -0
- package/dashboard/.next/server/chunks/ssr/src_components_1e6kjgr._.js.map +1 -0
- package/dashboard/.next/server/chunks/ssr/src_components_1eg_jit._.js +3 -0
- package/dashboard/.next/server/chunks/ssr/src_components_1eg_jit._.js.map +1 -0
- package/dashboard/.next/server/chunks/ssr/src_components_1pu8z89._.js +3 -0
- package/dashboard/.next/server/chunks/ssr/src_components_1pu8z89._.js.map +1 -0
- package/dashboard/.next/server/chunks/ssr/src_components_1z4akp5._.js +3 -0
- package/dashboard/.next/server/chunks/ssr/src_components_1z4akp5._.js.map +1 -0
- package/dashboard/.next/server/chunks/ssr/src_components_KeyManager_tsx_0r7iyz8._.js +3 -0
- package/dashboard/.next/server/chunks/ssr/src_components_KeyManager_tsx_0r7iyz8._.js.map +1 -0
- package/dashboard/.next/server/chunks/ssr/src_components_ProviderManager_tsx_09d2dzw._.js +3 -0
- package/dashboard/.next/server/chunks/ssr/src_components_ProviderManager_tsx_09d2dzw._.js.map +1 -0
- package/dashboard/.next/server/chunks/ssr/src_components_ToolDetail_tsx_0qperd-._.js +1 -1
- package/dashboard/.next/server/chunks/ssr/src_components_ToolDetail_tsx_0qperd-._.js.map +1 -1
- package/dashboard/.next/server/middleware-build-manifest.js +3 -3
- package/dashboard/.next/server/next-font-manifest.js +1 -1
- package/dashboard/.next/server/next-font-manifest.json +4 -0
- package/dashboard/.next/server/pages/404.html +1 -1
- package/dashboard/.next/server/pages/500.html +1 -1
- package/dashboard/.next/static/chunks/0-qqj0_fg6ef0.js +1 -0
- package/dashboard/.next/static/chunks/0347y27liw05t.js +1 -0
- package/dashboard/.next/static/chunks/0iv69e64f1ywa.css +3 -0
- package/dashboard/.next/static/chunks/0mou1p6uwiu19.js +1 -0
- package/dashboard/.next/static/chunks/0pf-u__m67vld.js +1 -0
- package/dashboard/.next/static/chunks/0zdns9uijk264.js +1 -0
- package/dashboard/.next/static/chunks/19nfww990cvv7.js +1 -0
- package/dashboard/.next/static/chunks/1t87-rpltg53e.js +1 -0
- package/dashboard/.next/static/chunks/1wn1c2w4ibyg_.js +1 -0
- package/dashboard/.next/static/chunks/29bgf5j_v6h2z.js +1 -0
- package/dashboard/.next/static/chunks/2uvgdots59tjl.js +1 -0
- package/dashboard/.next/static/chunks/3chs_cdkdx2h9.js +1 -0
- package/dashboard/.next/static/chunks/3y0b8yet0vgwr.js +1 -0
- package/dashboard/.next/trace +1 -1
- package/dashboard/.next/trace-build +1 -1
- package/dashboard/.next/types/routes.d.ts +2 -1
- package/dashboard/.next/types/validator.ts +9 -0
- package/dashboard/package-lock.json +56 -0
- package/dashboard/package.json +3 -0
- package/dashboard/src/app/(console)/keys/page.tsx +5 -0
- package/dashboard/src/app/api/cli-detect/[tool]/route.ts +0 -1
- package/dashboard/src/app/globals.css +1 -0
- package/dashboard/src/components/Badge.tsx +2 -1
- package/dashboard/src/components/EndpointView.tsx +49 -373
- package/dashboard/src/components/KeyManager.tsx +252 -0
- package/dashboard/src/components/KeyReveal.tsx +11 -11
- package/dashboard/src/components/KeyScopeModal.tsx +184 -0
- package/dashboard/src/components/ProviderManager.tsx +136 -44
- package/dashboard/src/components/Rail.tsx +2 -1
- package/dashboard/src/components/ToolDetail.tsx +0 -1
- package/dashboard/src/components/TopBar.tsx +102 -28
- package/dashboard/src/lib/client.ts +2 -0
- package/dist/cli.js +10 -4
- package/dist/cli.js.map +1 -1
- package/dist/config.js +14 -0
- package/dist/config.js.map +1 -1
- package/dist/routes/admin.js +8 -1
- package/dist/routes/admin.js.map +1 -1
- package/package.json +1 -1
- package/src/cli.ts +8 -4
- package/src/config.ts +12 -0
- package/src/routes/admin.ts +9 -0
- package/assets/screenshot.png +0 -0
- package/dashboard/.next/server/chunks/ssr/_1jt-_lv._.js +0 -3
- package/dashboard/.next/server/chunks/ssr/_1jt-_lv._.js.map +0 -1
- package/dashboard/.next/server/chunks/ssr/src_02ocd5c._.js +0 -3
- package/dashboard/.next/server/chunks/ssr/src_02ocd5c._.js.map +0 -1
- package/dashboard/.next/server/chunks/ssr/src_0az41dg._.js +0 -3
- package/dashboard/.next/server/chunks/ssr/src_0az41dg._.js.map +0 -1
- package/dashboard/.next/server/chunks/ssr/src_components_0nuo5yx._.js +0 -3
- package/dashboard/.next/server/chunks/ssr/src_components_0nuo5yx._.js.map +0 -1
- package/dashboard/.next/server/chunks/ssr/src_components_12gk6sc._.js +0 -3
- package/dashboard/.next/server/chunks/ssr/src_components_12gk6sc._.js.map +0 -1
- package/dashboard/.next/server/chunks/ssr/src_components_17nnhsa._.js +0 -3
- package/dashboard/.next/server/chunks/ssr/src_components_17nnhsa._.js.map +0 -1
- package/dashboard/.next/server/chunks/ssr/src_components_1kc5vh2._.js +0 -3
- package/dashboard/.next/server/chunks/ssr/src_components_1kc5vh2._.js.map +0 -1
- package/dashboard/.next/server/chunks/ssr/src_components_1zwow63._.js +0 -3
- package/dashboard/.next/server/chunks/ssr/src_components_1zwow63._.js.map +0 -1
- package/dashboard/.next/server/chunks/ssr/src_components_EndpointView_tsx_0awdzb5._.js +0 -3
- package/dashboard/.next/server/chunks/ssr/src_components_EndpointView_tsx_0awdzb5._.js.map +0 -1
- package/dashboard/.next/server/chunks/ssr/src_components_ModelPicker_tsx_1jisxh6._.js +0 -3
- package/dashboard/.next/server/chunks/ssr/src_components_ModelPicker_tsx_1jisxh6._.js.map +0 -1
- package/dashboard/.next/static/chunks/063d_vdu_m-g_.js +0 -1
- package/dashboard/.next/static/chunks/0tq5u12liycmg.js +0 -1
- package/dashboard/.next/static/chunks/1-r9spn081_wo.js +0 -1
- package/dashboard/.next/static/chunks/16vbdc0g5xea0.js +0 -1
- package/dashboard/.next/static/chunks/1dct1l5y9lz4l.js +0 -1
- package/dashboard/.next/static/chunks/22r7w355mazs8.js +0 -1
- package/dashboard/.next/static/chunks/2zho1fpijk0fu.js +0 -1
- package/dashboard/.next/static/chunks/3lh9dc1j-3gxi.css +0 -3
- package/dashboard/.next/static/chunks/3mhsmb2ks1vev.js +0 -1
- package/dashboard/.next/static/chunks/3nrz6v06gppob.js +0 -1
- package/dashboard/.next/static/chunks/3qigg14c4xgka.js +0 -1
- /package/dashboard/.next/static/{Qebwgk51Ssl5h3hVnQurS → DzOHVl0QeJ1RnKMho8Q0_}/_buildManifest.js +0 -0
- /package/dashboard/.next/static/{Qebwgk51Ssl5h3hVnQurS → DzOHVl0QeJ1RnKMho8Q0_}/_clientMiddlewareManifest.js +0 -0
- /package/dashboard/.next/static/{Qebwgk51Ssl5h3hVnQurS → DzOHVl0QeJ1RnKMho8Q0_}/_ssgManifest.js +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,47 @@ All notable changes to **aigetwey** are documented here.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.4.1] — 2026-06-27
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- **Usage data lost on upgrade** — `usage.sqlite` (providers, budgets, request
|
|
12
|
+
history) was not migrated from the old `data/` directory to `~/.aigetwey/`
|
|
13
|
+
when upgrading via `npm install -g`. Dashboard showed empty state. Now the
|
|
14
|
+
database is copied automatically on first run after upgrade.
|
|
15
|
+
|
|
16
|
+
## [1.4.0] — 2026-06-27
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
- **Access Keys page** — dedicated `/keys` page with card grid, per-key scope
|
|
20
|
+
modal (models, rate limit, expiry, budget), and inline search/filter.
|
|
21
|
+
- **Provider drag-to-reorder** — reorder provider cards via drag-and-drop
|
|
22
|
+
(@dnd-kit/sortable); priority persists to config.
|
|
23
|
+
- **Update modal** — top bar update chip opens a modal with copy command and
|
|
24
|
+
"Copy & Shut down" action for seamless upgrades.
|
|
25
|
+
- **Key name deduplication** — adding a key with an existing name is rejected
|
|
26
|
+
with an inline error banner.
|
|
27
|
+
|
|
28
|
+
### Changed
|
|
29
|
+
- **"Gateway Keys" → "Access Keys"** — renamed across nav, top bar, and page.
|
|
30
|
+
- **Provider cards** — larger font sizes, more padding, "free" badge renamed to
|
|
31
|
+
"no auth", provider lamp turns red (not grey) when toggled off,
|
|
32
|
+
enabled/disabled label removed from toggle.
|
|
33
|
+
- **Key cards** — buttons match budget card style (Edit / Remove, always
|
|
34
|
+
visible); rename merged into the scope modal; active badge is green, expired
|
|
35
|
+
is red.
|
|
36
|
+
- **Endpoint card** — full-width, URL label simplified to "Local".
|
|
37
|
+
- **Dashboard readability** — 1.06× zoom on main content area for better
|
|
38
|
+
legibility across all pages.
|
|
39
|
+
- **README** — updated screenshots (Endpoint, Access Keys, Budgets).
|
|
40
|
+
|
|
41
|
+
### Fixed
|
|
42
|
+
- **ModelPicker crash** — `onSelect` → `onToggle` prop fix in key scope modal.
|
|
43
|
+
- **Key reveal layout shift** — copy button reserves space when hidden.
|
|
44
|
+
- **Error display** — key page errors shown as dismissible inline banner instead
|
|
45
|
+
of full-page blank.
|
|
46
|
+
- **Version chip** — shows "current → latest" instead of "vX available".
|
|
47
|
+
- **CLI tools** — removed hardcoded `API_TIMEOUT_MS` from config preview.
|
|
48
|
+
|
|
8
49
|
## [1.3.9] — 2026-06-26
|
|
9
50
|
|
|
10
51
|
### Added
|
package/README.md
CHANGED
|
@@ -2,122 +2,106 @@
|
|
|
2
2
|
<img src="./assets/wordmark.svg" width="420" alt="aigetwey">
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
<p align="center">
|
|
6
|
+
<strong>Personal AI gateway for CLI coding tools</strong><br>
|
|
7
|
+
One endpoint · format translation · fallback routing · token saving · spend control
|
|
8
|
+
</p>
|
|
9
|
+
|
|
10
|
+
<p align="center">
|
|
11
|
+
<a href="https://www.npmjs.com/package/aigetwey"><img src="https://img.shields.io/npm/v/aigetwey.svg" alt="npm"></a>
|
|
12
|
+
<a href="./LICENSE"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="MIT"></a>
|
|
13
|
+
<img src="https://img.shields.io/badge/node-%3E%3D22-brightgreen.svg" alt="Node ≥22">
|
|
14
|
+
</p>
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
Point Claude Code, opencode, Cursor, Cline, or Codex at `localhost:18080` and get:
|
|
19
|
+
|
|
20
|
+
- **Format translation** — clients speak OpenAI or Anthropic; the gateway translates on the fly, streaming included
|
|
21
|
+
- **Fallback routing** — one model alias resolves to a priority chain of providers; on 429/5xx/timeout it rotates keys and falls through
|
|
22
|
+
- **Token savers** — RTK compresses `tool_result`, caveman trims prose, ponytail nudges minimal code, headroom compresses context — all toggleable per-endpoint
|
|
23
|
+
- **Access keys** — hand a gateway key to anyone; set model allowlist, rate limit, spend cap, and expiry per key
|
|
24
|
+
- **Budgets** — rolling spend caps (global/provider/model/key) with live countdown, SQLite cost tracking per token type
|
|
25
|
+
- **Dashboard** — providers, combos, usage, budgets, CLI tools, live console, settings, drag-to-reorder
|
|
6
26
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
27
|
+
```bash
|
|
28
|
+
npm install -g aigetwey && aigetwey
|
|
29
|
+
```
|
|
10
30
|
|
|
11
|
-
|
|
12
|
-
tools (Claude Code, opencode, Cursor, Cline, Codex), translates between formats,
|
|
13
|
-
routes with fallback across providers, and tracks token usage and cost. Ships
|
|
14
|
-
with a built-in dashboard.
|
|
31
|
+
First run bootstraps everything. Subsequent runs start instantly.
|
|
15
32
|
|
|
16
33
|
<p align="center">
|
|
17
|
-
<img src="./assets/screenshot.png" width="860" alt="
|
|
34
|
+
<img src="./assets/screenshot-endpoint.png" width="860" alt="Endpoint">
|
|
35
|
+
</p>
|
|
36
|
+
<p align="center">
|
|
37
|
+
<img src="./assets/screenshot-accesskey.png" width="860" alt="Access Keys">
|
|
38
|
+
</p>
|
|
39
|
+
<p align="center">
|
|
40
|
+
<img src="./assets/screenshot-budgets.png" width="860" alt="Budgets">
|
|
18
41
|
</p>
|
|
19
42
|
|
|
20
|
-
|
|
43
|
+
**Language:** [English](#getting-started) · [Bahasa Indonesia](#memulai)
|
|
21
44
|
|
|
22
45
|
See [CHANGELOG.md](./CHANGELOG.md) for release history.
|
|
23
46
|
|
|
24
47
|
---
|
|
25
48
|
|
|
26
|
-
##
|
|
27
|
-
|
|
28
|
-
###
|
|
29
|
-
|
|
30
|
-
- **One endpoint, every format** — clients speak OpenAI (`/v1/chat/completions`)
|
|
31
|
-
or Anthropic (`/v1/messages`); the gateway translates to/from OpenAI- and
|
|
32
|
-
Anthropic-compatible providers, streaming included.
|
|
33
|
-
- **Routing + fallback** — a client alias resolves to a prioritized provider
|
|
34
|
-
chain; on 429/5xx/timeout it rotates keys and falls through to the next.
|
|
35
|
-
- **Token savers** — RTK compresses bulky `tool_result` blocks; caveman trims
|
|
36
|
-
output prose; ponytail nudges minimal code; headroom compresses context via an
|
|
37
|
-
external `/v1/compress`. All toggle per-endpoint.
|
|
38
|
-
- **Share it safely** — hand a gateway key to a teammate or a friend and set its
|
|
39
|
-
model allowlist, rate limit, **spend cap**, and **expiry** in one place. Each
|
|
40
|
-
key's budget resets on its own rolling cycle, so a shared key behaves like a
|
|
41
|
-
self-renewing monthly allowance; an expired key is refused with `403`.
|
|
42
|
-
- **Budgets + cost** — scoped spend caps (global/provider/model/key) over rolling
|
|
43
|
-
`5h`/`24h`/`7day`/`30day` windows anchored to when each budget was created, with a
|
|
44
|
-
live reset countdown and SQLite-backed usage/cost tracking. Cost uses separate
|
|
45
|
-
rates for input, cached-read, output, and reasoning tokens. The Budgets page
|
|
46
|
-
splits **Overall** caps from a **Keys** view that shows every key's spend.
|
|
47
|
-
- **Dashboard** — providers, combos, usage, budgets, CLI tools, a live server
|
|
48
|
-
console, and a settings page with a per-model pricing editor.
|
|
49
|
-
|
|
50
|
-
### Token savers
|
|
51
|
-
|
|
52
|
-
Toggle these per-endpoint in the dashboard. The first three are **built into the
|
|
53
|
-
gateway** — nothing extra to install, they ship with the npm package. Headroom is
|
|
54
|
-
the only one that needs an **external** tool.
|
|
55
|
-
|
|
56
|
-
| Saver | What it does | Upstream | Install |
|
|
57
|
-
| --- | --- | --- | --- |
|
|
58
|
-
| **RTK** | Compresses bulky `tool_result` blocks in the request (git/grep/ls/logs). | [rtk-ai/rtk](https://github.com/rtk-ai/rtk) | built-in |
|
|
59
|
-
| **Caveman** | Terse-output system prompt — cuts output prose tokens. | [JuliusBrussee/caveman](https://github.com/JuliusBrussee/caveman) | built-in |
|
|
60
|
-
| **Ponytail** | Biases the model toward minimal code (YAGNI, reuse, deletion). | [DietrichGebert/ponytail](https://github.com/DietrichGebert/ponytail) | built-in |
|
|
61
|
-
| **Headroom** | Pipes context through an external `/v1/compress` proxy. | [chopratejas/headroom](https://github.com/chopratejas/headroom) | **external** |
|
|
62
|
-
|
|
63
|
-
**Headroom** is the only external piece — a separate Python tool the gateway just
|
|
64
|
-
detects and calls, never bundled. Install it from
|
|
65
|
-
[chopratejas/headroom](https://github.com/chopratejas/headroom) (Python ≥ 3.10),
|
|
66
|
-
then run `headroom proxy` (default `http://localhost:8787`). With it absent the
|
|
67
|
-
Headroom toggle stays off and everything else works unchanged. The dashboard's
|
|
68
|
-
Endpoint & Key page shows install status and a one-line install hint.
|
|
69
|
-
|
|
70
|
-
### Install
|
|
71
|
-
|
|
72
|
-
**Global (npm):**
|
|
49
|
+
## Getting started
|
|
50
|
+
|
|
51
|
+
### Quick start
|
|
73
52
|
|
|
74
53
|
```bash
|
|
75
54
|
npm install -g aigetwey
|
|
76
55
|
aigetwey
|
|
77
56
|
```
|
|
78
57
|
|
|
79
|
-
The
|
|
80
|
-
dependencies, builds the dashboard, then starts the gateway + dashboard and opens
|
|
81
|
-
your browser. Subsequent runs start instantly.
|
|
58
|
+
The CLI seeds `config.yaml`, builds the dashboard, opens your browser. One URL serves everything — dashboard, API, and admin: `http://127.0.0.1:18080`.
|
|
82
59
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
macOS + Linux), or **Exit**. Flags: `-p/--port`, `-n/--no-browser`, `-y/--yes`
|
|
86
|
-
(skip the menu), `-t/--tray`, `-h/--help`.
|
|
60
|
+
A terminal menu offers: **Web UI** / **Terminal** (logs) / **Hide to Tray** (macOS + Linux) / **Exit**.
|
|
61
|
+
Flags: `-p/--port`, `-n/--no-browser`, `-y/--yes`, `-t/--tray`.
|
|
87
62
|
|
|
88
|
-
|
|
63
|
+
### From source
|
|
89
64
|
|
|
90
65
|
```bash
|
|
91
66
|
git clone https://github.com/xk1ko/aigetwey.git
|
|
92
|
-
cd aigetwey
|
|
93
|
-
|
|
94
|
-
cp config.example.yaml config.yaml # then edit: add providers + a server key
|
|
67
|
+
cd aigetwey && npm install
|
|
68
|
+
cp config.example.yaml config.yaml # add providers + a server key
|
|
95
69
|
npm install --prefix dashboard
|
|
96
|
-
./run.sh
|
|
70
|
+
./run.sh # Ctrl-C stops both
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Connect your tools
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
# Claude Code (Anthropic format)
|
|
77
|
+
export ANTHROPIC_BASE_URL=http://127.0.0.1:18080
|
|
78
|
+
export ANTHROPIC_API_KEY=my-key
|
|
79
|
+
|
|
80
|
+
# opencode / Cursor / Cline / Codex (OpenAI format)
|
|
81
|
+
export OPENAI_BASE_URL=http://127.0.0.1:18080/v1
|
|
82
|
+
export OPENAI_API_KEY=my-key
|
|
97
83
|
```
|
|
98
84
|
|
|
99
|
-
|
|
100
|
-
startup). Set it to keep it stable across runs. **One URL serves everything** —
|
|
101
|
-
`http://127.0.0.1:18080`: the dashboard, the API (`/v1`, `/messages`), and the
|
|
102
|
-
admin endpoints. The gateway reverse-proxies the dashboard, so clients and the
|
|
103
|
-
console share a single address.
|
|
85
|
+
The dashboard's **CLI Tools** page detects installed tools and writes configs for you.
|
|
104
86
|
|
|
105
|
-
|
|
87
|
+
**Model resolution** (in order): combo alias → `provider/model` → bare model id (auto-detected from catalogs).
|
|
106
88
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## Configuration
|
|
92
|
+
|
|
93
|
+
`config.yaml` is the source of truth and **hot-reloads** — edits via dashboard or API apply instantly.
|
|
110
94
|
|
|
111
95
|
```yaml
|
|
112
96
|
server:
|
|
113
97
|
host: 127.0.0.1
|
|
114
98
|
port: 18080
|
|
115
|
-
api_keys: [my-key] #
|
|
99
|
+
api_keys: [my-key] # empty = auth OFF (localhost only)
|
|
116
100
|
|
|
117
101
|
endpoint:
|
|
118
|
-
rtk: true # compress tool_result
|
|
119
|
-
caveman: full # off | lite | full | ultra
|
|
120
|
-
ponytail: lite # off | lite | full | ultra
|
|
102
|
+
rtk: true # compress tool_result blocks
|
|
103
|
+
caveman: full # off | lite | full | ultra
|
|
104
|
+
ponytail: lite # off | lite | full | ultra
|
|
121
105
|
|
|
122
106
|
providers:
|
|
123
107
|
- id: anthropic
|
|
@@ -127,61 +111,56 @@ providers:
|
|
|
127
111
|
- id: opencode-free
|
|
128
112
|
format: openai
|
|
129
113
|
base_url: https://opencode.ai/zen/v1
|
|
130
|
-
free: true
|
|
131
|
-
auto_models: true
|
|
114
|
+
free: true
|
|
115
|
+
auto_models: true
|
|
132
116
|
|
|
133
|
-
models:
|
|
117
|
+
models:
|
|
134
118
|
- alias: claude-sonnet-4-6
|
|
135
119
|
target: [anthropic, opencode-free] # fallback order
|
|
136
120
|
model: [claude-sonnet-4-6, claude-sonnet-4-5]
|
|
137
|
-
price_in: 3 # USD per 1M tokens
|
|
121
|
+
price_in: 3 # USD per 1M tokens
|
|
138
122
|
price_out: 15
|
|
139
123
|
|
|
140
|
-
budgets:
|
|
124
|
+
budgets:
|
|
141
125
|
- scope: { type: global }
|
|
142
|
-
unit: usd
|
|
126
|
+
unit: usd
|
|
143
127
|
limit: 50
|
|
144
|
-
window: 30day
|
|
128
|
+
window: 30day
|
|
145
129
|
```
|
|
146
130
|
|
|
147
|
-
A **combo** is
|
|
148
|
-
routed to an ordered provider chain. `strategy: fallback` (default) tries the
|
|
149
|
-
chain in order, falling through on 429/5xx/timeout; `strategy: round-robin`
|
|
150
|
-
rotates the first provider tried per request to spread load.
|
|
131
|
+
A **combo** is a `models` entry — an alias routed to a provider chain. Strategies: `fallback` (default, sequential) or `round-robin` (spread load).
|
|
151
132
|
|
|
152
|
-
|
|
133
|
+
---
|
|
153
134
|
|
|
154
|
-
|
|
155
|
-
for you (Claude Code, opencode), or generates copy-ready env. In short, point the
|
|
156
|
-
tool's base URL + key at the gateway and call a routing alias as the model name:
|
|
135
|
+
## Token savers
|
|
157
136
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
137
|
+
| Saver | What it does | Source | Install |
|
|
138
|
+
|-------|-------------|--------|---------|
|
|
139
|
+
| **RTK** | Compresses bulky `tool_result` blocks (git/grep/ls) | [rtk-ai/rtk](https://github.com/rtk-ai/rtk) | built-in |
|
|
140
|
+
| **Caveman** | Terse system prompt — cuts output prose | [JuliusBrussee/caveman](https://github.com/JuliusBrussee/caveman) | built-in |
|
|
141
|
+
| **Ponytail** | Nudges minimal code (YAGNI, deletion) | [DietrichGebert/ponytail](https://github.com/DietrichGebert/ponytail) | built-in |
|
|
142
|
+
| **Headroom** | Pipes context through `/v1/compress` | [chopratejas/headroom](https://github.com/chopratejas/headroom) | **external** |
|
|
162
143
|
|
|
163
|
-
|
|
164
|
-
export OPENAI_BASE_URL=http://127.0.0.1:18080/v1
|
|
165
|
-
export OPENAI_API_KEY=my-key
|
|
166
|
-
```
|
|
144
|
+
Headroom is the only external dependency — install from [chopratejas/headroom](https://github.com/chopratejas/headroom) (Python ≥ 3.10), run `headroom proxy`. Without it the toggle stays off; everything else works.
|
|
167
145
|
|
|
168
|
-
|
|
169
|
-
**combo alias** → its provider chain; (2) **`provider/model`** (e.g.
|
|
170
|
-
`anthropic/claude-sonnet-4-6`) → straight to that provider; (3) a **bare model
|
|
171
|
-
id** → auto-detected against every provider's catalog.
|
|
146
|
+
---
|
|
172
147
|
|
|
173
|
-
|
|
148
|
+
## Environment variables
|
|
174
149
|
|
|
175
|
-
|
|
176
|
-
|
|
150
|
+
| Variable | Purpose |
|
|
151
|
+
|----------|---------|
|
|
152
|
+
| `AIGETWEY_CONFIG` | Config file path |
|
|
153
|
+
| `AIGETWEY_DATA_DIR` | Usage DB directory |
|
|
154
|
+
| `AIGETWEY_ADMIN_PASSWORD` | Admin + dashboard auth |
|
|
155
|
+
| `AIGETWEY_PORT` | Listen port |
|
|
177
156
|
|
|
178
|
-
Dashboard (`dashboard/.env.local`): `GATEWAY_URL`, `ADMIN_PASSWORD`
|
|
179
|
-
the gateway), `SESSION_SECRET` (`openssl rand -hex 32`).
|
|
157
|
+
Dashboard (`dashboard/.env.local`): `GATEWAY_URL`, `ADMIN_PASSWORD`, `SESSION_SECRET`.
|
|
180
158
|
|
|
181
|
-
|
|
182
|
-
proxies `/admin/*` server-side with the Bearer injected, and keys are masked.
|
|
159
|
+
Admin password and provider keys never reach the browser — the dashboard proxies `/admin/*` server-side.
|
|
183
160
|
|
|
184
|
-
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
## Development
|
|
185
164
|
|
|
186
165
|
```bash
|
|
187
166
|
npm run typecheck # tsc, no emit
|
|
@@ -191,90 +170,18 @@ npm run build # compile to dist/
|
|
|
191
170
|
|
|
192
171
|
---
|
|
193
172
|
|
|
194
|
-
##
|
|
195
|
-
|
|
196
|
-
### Sorotan
|
|
197
|
-
|
|
198
|
-
- **Satu endpoint, semua format** — klien bicara OpenAI (`/v1/chat/completions`)
|
|
199
|
-
atau Anthropic (`/v1/messages`); gateway menerjemahkan ke/dari provider yang
|
|
200
|
-
kompatibel OpenAI & Anthropic, termasuk streaming.
|
|
201
|
-
- **Routing + fallback** — sebuah alias klien diarahkan ke rantai provider
|
|
202
|
-
berprioritas; saat 429/5xx/timeout ia memutar key dan jatuh ke provider
|
|
203
|
-
berikutnya.
|
|
204
|
-
- **Penghemat token** — RTK memampatkan blok `tool_result` besar; caveman
|
|
205
|
-
meringkas prosa output; ponytail mendorong kode minimal; headroom memampatkan
|
|
206
|
-
konteks lewat `/v1/compress` eksternal. Semua bisa di-toggle per-endpoint.
|
|
207
|
-
- **Bagikan dengan aman** — kasih satu gateway key ke teman/rekan, lalu atur
|
|
208
|
-
allowlist model, rate limit, **batas spend**, dan **kedaluwarsa** di satu tempat.
|
|
209
|
-
Budget tiap key reset di siklus rolling-nya sendiri (jadi terasa seperti jatah
|
|
210
|
-
bulanan yang isi ulang otomatis); key yang kedaluwarsa ditolak `403`.
|
|
211
|
-
- **Budget + biaya** — batas spend berskop (global/provider/model/key) atas jendela
|
|
212
|
-
rolling `5h`/`24h`/`7day`/`30day` yang di-anchor ke saat budget dibuat, dengan
|
|
213
|
-
hitung mundur reset dan pelacakan pemakaian/biaya berbasis SQLite. Biaya dihitung
|
|
214
|
-
per jenis token (input, cached-read, output, reasoning). Halaman Budgets
|
|
215
|
-
memisah cap **Overall** dari tampilan **Keys** (pemakaian tiap key).
|
|
216
|
-
- **Dashboard** — providers, combos, usage, budgets, CLI tools, server console
|
|
217
|
-
live, dan halaman settings dengan editor harga per-model.
|
|
218
|
-
|
|
219
|
-
### Penghemat token
|
|
220
|
-
|
|
221
|
-
**RTK** ([rtk-ai/rtk](https://github.com/rtk-ai/rtk)), **Caveman**
|
|
222
|
-
([JuliusBrussee/caveman](https://github.com/JuliusBrussee/caveman)), **Ponytail**
|
|
223
|
-
([DietrichGebert/ponytail](https://github.com/DietrichGebert/ponytail)) =
|
|
224
|
-
**built-in** (ikut paket npm, tak perlu install apa pun). Hanya **Headroom**
|
|
225
|
-
([chopratejas/headroom](https://github.com/chopratejas/headroom)) yang
|
|
226
|
-
**eksternal**: tool Python terpisah (tidak di-bundle — gateway cuma mendeteksi &
|
|
227
|
-
memanggilnya), butuh Python ≥ 3.10, jalankan `headroom proxy` (default
|
|
228
|
-
`http://localhost:8787`). Tanpa Headroom toggle-nya mati & sisanya tetap jalan;
|
|
229
|
-
halaman Endpoint & Key di dashboard menampilkan status install + hint.
|
|
230
|
-
|
|
231
|
-
### Instalasi
|
|
173
|
+
## Memulai
|
|
232
174
|
|
|
233
|
-
|
|
175
|
+
### Mulai cepat
|
|
234
176
|
|
|
235
177
|
```bash
|
|
236
178
|
npm install -g aigetwey
|
|
237
179
|
aigetwey
|
|
238
180
|
```
|
|
239
181
|
|
|
240
|
-
|
|
241
|
-
dependency dashboard, build dashboard, lalu menjalankan gateway + dashboard dan
|
|
242
|
-
membuka browser. Run berikutnya langsung jalan.
|
|
182
|
+
Run pertama bootstrap otomatis — buat `config.yaml`, build dashboard, buka browser. Satu URL untuk semuanya: `http://127.0.0.1:18080`.
|
|
243
183
|
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
```bash
|
|
247
|
-
git clone https://github.com/xk1ko/aigetwey.git
|
|
248
|
-
cd aigetwey
|
|
249
|
-
npm install
|
|
250
|
-
cp config.example.yaml config.yaml # lalu edit: tambah provider + server key
|
|
251
|
-
npm install --prefix dashboard
|
|
252
|
-
./run.sh # gateway + dashboard (Ctrl-C hentikan keduanya)
|
|
253
|
-
```
|
|
254
|
-
|
|
255
|
-
Admin password dibuat otomatis kalau `AIGETWEY_ADMIN_PASSWORD` belum di-set
|
|
256
|
-
(dicetak saat start). Set agar stabil antar run. **Satu URL untuk semuanya** —
|
|
257
|
-
`http://127.0.0.1:18080`: dashboard, API (`/v1`, `/messages`), dan admin. Gateway
|
|
258
|
-
mem-proxy dashboard, jadi client & console pakai satu alamat.
|
|
259
|
-
|
|
260
|
-
### Konfigurasi
|
|
261
|
-
|
|
262
|
-
`config.yaml` adalah sumber kebenaran dan **hot-reload** — perubahan lewat
|
|
263
|
-
dashboard (atau API) langsung berlaku tanpa restart. Lihat `config.example.yaml`
|
|
264
|
-
untuk semua bentuk provider. Intinya sama seperti contoh di bagian English di
|
|
265
|
-
atas (`server`, `endpoint`, `providers`, `models`).
|
|
266
|
-
|
|
267
|
-
Sebuah **combo** adalah satu entry `models`: alias yang dipanggil CLI tool-mu,
|
|
268
|
-
diarahkan ke rantai provider berurutan. `strategy: fallback` (default) mencoba
|
|
269
|
-
rantai berurutan, jatuh saat 429/5xx/timeout; `strategy: round-robin` memutar
|
|
270
|
-
provider pertama tiap request untuk membagi beban.
|
|
271
|
-
|
|
272
|
-
### Menghubungkan CLI tools
|
|
273
|
-
|
|
274
|
-
Halaman **CLI Tools** di dashboard mendeteksi tool lokal dan menulis config-nya
|
|
275
|
-
untukmu (Claude Code, opencode), atau menghasilkan env siap-salin. Singkatnya,
|
|
276
|
-
arahkan base URL + key tool ke gateway dan panggil alias routing sebagai nama
|
|
277
|
-
model:
|
|
184
|
+
### Hubungkan tool
|
|
278
185
|
|
|
279
186
|
```bash
|
|
280
187
|
# Claude Code (format Anthropic)
|
|
@@ -286,35 +193,42 @@ export OPENAI_BASE_URL=http://127.0.0.1:18080/v1
|
|
|
286
193
|
export OPENAI_API_KEY=my-key
|
|
287
194
|
```
|
|
288
195
|
|
|
289
|
-
**
|
|
290
|
-
combo** → rantai provider-nya; (2) **`provider/model`** (mis.
|
|
291
|
-
`anthropic/claude-sonnet-4-6`) → langsung ke provider itu; (3) **id model polos**
|
|
292
|
-
→ dideteksi otomatis dari katalog tiap provider.
|
|
196
|
+
Halaman **CLI Tools** di dashboard mendeteksi tool dan menulis config otomatis.
|
|
293
197
|
|
|
294
|
-
###
|
|
198
|
+
### Fitur utama
|
|
295
199
|
|
|
296
|
-
|
|
297
|
-
|
|
200
|
+
- **Satu endpoint, semua format** — translate OpenAI ↔ Anthropic otomatis, termasuk streaming
|
|
201
|
+
- **Routing + fallback** — alias model → rantai provider berprioritas; rotasi key saat 429/5xx/timeout
|
|
202
|
+
- **Penghemat token** — RTK, Caveman, Ponytail (built-in) + Headroom (eksternal)
|
|
203
|
+
- **Access keys** — bagi key ke teman dengan allowlist model, rate limit, batas spend, dan kedaluwarsa
|
|
204
|
+
- **Budget** — spend cap rolling (5h/24h/7day/30day) dengan countdown dan tracking per jenis token
|
|
205
|
+
- **Dashboard** — providers, combos, usage, budgets, CLI tools, console live, settings, drag-to-reorder
|
|
298
206
|
|
|
299
|
-
|
|
300
|
-
dengan gateway), `SESSION_SECRET` (`openssl rand -hex 32`).
|
|
207
|
+
### Penghemat token
|
|
301
208
|
|
|
302
|
-
|
|
303
|
-
mem-proxy `/admin/*` di sisi server dengan Bearer disuntik, dan key disamarkan.
|
|
209
|
+
RTK, Caveman, Ponytail = **built-in**. Hanya Headroom yang **eksternal** (Python, `headroom proxy`). Tanpa Headroom toggle-nya mati, sisanya tetap jalan.
|
|
304
210
|
|
|
305
|
-
###
|
|
211
|
+
### Konfigurasi
|
|
306
212
|
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
213
|
+
`config.yaml` hot-reload — edit lewat dashboard/API langsung berlaku tanpa restart. Lihat `config.example.yaml` untuk semua bentuk provider.
|
|
214
|
+
|
|
215
|
+
**Combo** = entry `models`: alias → rantai provider. Strategy: `fallback` (default) atau `round-robin`.
|
|
216
|
+
|
|
217
|
+
**Resolusi model**: alias combo → `provider/model` → id model polos (deteksi otomatis).
|
|
218
|
+
|
|
219
|
+
### Environment
|
|
220
|
+
|
|
221
|
+
Gateway: `AIGETWEY_CONFIG`, `AIGETWEY_DATA_DIR`, `AIGETWEY_ADMIN_PASSWORD`, `AIGETWEY_PORT`.
|
|
222
|
+
|
|
223
|
+
Dashboard: `GATEWAY_URL`, `ADMIN_PASSWORD`, `SESSION_SECRET`.
|
|
224
|
+
|
|
225
|
+
Password admin dan key provider tidak pernah sampai ke browser.
|
|
312
226
|
|
|
313
227
|
---
|
|
314
228
|
|
|
315
229
|
## Acknowledgements
|
|
316
230
|
|
|
317
|
-
Inspired by [9router](https://github.com/decolua/9router) — its feature set and dashboard shaped much of this project's direction.
|
|
231
|
+
Inspired by [9router](https://github.com/decolua/9router) — its feature set and dashboard shaped much of this project's direction.
|
|
318
232
|
|
|
319
233
|
## License
|
|
320
234
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dashboard/.next/BUILD_ID
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
DzOHVl0QeJ1RnKMho8Q0_
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
"/(console)/config/page": "/config",
|
|
4
4
|
"/(console)/console/page": "/console",
|
|
5
5
|
"/(console)/endpoint/page": "/endpoint",
|
|
6
|
+
"/(console)/keys/page": "/keys",
|
|
6
7
|
"/(console)/page": "/",
|
|
7
8
|
"/(console)/providers/[id]/page": "/providers/[id]",
|
|
8
9
|
"/(console)/providers/page": "/providers",
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
"static/chunks/0cz1d0mv5g_q7.js"
|
|
8
8
|
],
|
|
9
9
|
"lowPriorityFiles": [
|
|
10
|
-
"static/
|
|
11
|
-
"static/
|
|
12
|
-
"static/
|
|
10
|
+
"static/DzOHVl0QeJ1RnKMho8Q0_/_buildManifest.js",
|
|
11
|
+
"static/DzOHVl0QeJ1RnKMho8Q0_/_ssgManifest.js",
|
|
12
|
+
"static/DzOHVl0QeJ1RnKMho8Q0_/_clientMiddlewareManifest.js"
|
|
13
13
|
],
|
|
14
14
|
"rootMainFiles": [
|
|
15
15
|
"static/chunks/36ssnkm0cjgq6.js",
|