├── .gitignore ├── LICENSE ├── README.md ├── package.json ├── prompts └── 2025-10-19-vitest-migration.md ├── public ├── _headers ├── aipipe.js ├── index.html ├── login.html ├── login.js ├── playground.html ├── playground.js └── usage.js ├── src ├── config.example.js ├── cost.js ├── pricing.json ├── providers.js ├── utils.js └── worker.js ├── tests ├── admin.test.js ├── authentication.test.js ├── cors.test.js ├── fixtures │ ├── durable-usage.state.json │ ├── gemini-embedding.json │ ├── gemini-generate-stream.json │ ├── gemini-generate.json │ ├── gemini.scenarios.json │ ├── index.js │ ├── openai-chat-completions.json │ ├── openai-embedding.json │ ├── openai-responses-stream.json │ ├── openai.scenarios.json │ ├── openrouter-budget-blocked.request.json │ ├── openrouter-chat-stream.json │ ├── openrouter-chat.json │ ├── openrouter-chat.scenarios.json │ ├── openrouter-invalid-salt.request.json │ ├── openrouter-missing-auth.request.json │ ├── openrouter-models.scenarios.json │ ├── openrouter-options-custom.request.json │ ├── openrouter-options.request.json │ ├── openrouter-success.json │ ├── openrouter-unauthorized.json │ ├── similarity-openai.response.json │ ├── similarity.json │ └── similarity.scenarios.json ├── helpers │ └── scenario-runner.js ├── native-api-key.test.js ├── providers.test.js ├── proxy.test.js ├── readme.test.js ├── scenarios.test.js ├── smoke.test.js ├── test-helpers.js ├── usage.test.js └── vitest.config.js ├── vitest.config.js └── wrangler.toml /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanand0/aipipe/HEAD/.gitignore -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanand0/aipipe/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanand0/aipipe/HEAD/README.md -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanand0/aipipe/HEAD/package.json -------------------------------------------------------------------------------- /prompts/2025-10-19-vitest-migration.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanand0/aipipe/HEAD/prompts/2025-10-19-vitest-migration.md -------------------------------------------------------------------------------- /public/_headers: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanand0/aipipe/HEAD/public/_headers -------------------------------------------------------------------------------- /public/aipipe.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanand0/aipipe/HEAD/public/aipipe.js -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanand0/aipipe/HEAD/public/index.html -------------------------------------------------------------------------------- /public/login.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanand0/aipipe/HEAD/public/login.html -------------------------------------------------------------------------------- /public/login.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanand0/aipipe/HEAD/public/login.js -------------------------------------------------------------------------------- /public/playground.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanand0/aipipe/HEAD/public/playground.html -------------------------------------------------------------------------------- /public/playground.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanand0/aipipe/HEAD/public/playground.js -------------------------------------------------------------------------------- /public/usage.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanand0/aipipe/HEAD/public/usage.js -------------------------------------------------------------------------------- /src/config.example.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanand0/aipipe/HEAD/src/config.example.js -------------------------------------------------------------------------------- /src/cost.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanand0/aipipe/HEAD/src/cost.js -------------------------------------------------------------------------------- /src/pricing.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanand0/aipipe/HEAD/src/pricing.json -------------------------------------------------------------------------------- /src/providers.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanand0/aipipe/HEAD/src/providers.js -------------------------------------------------------------------------------- /src/utils.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanand0/aipipe/HEAD/src/utils.js -------------------------------------------------------------------------------- /src/worker.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanand0/aipipe/HEAD/src/worker.js -------------------------------------------------------------------------------- /tests/admin.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanand0/aipipe/HEAD/tests/admin.test.js -------------------------------------------------------------------------------- /tests/authentication.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanand0/aipipe/HEAD/tests/authentication.test.js -------------------------------------------------------------------------------- /tests/cors.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanand0/aipipe/HEAD/tests/cors.test.js -------------------------------------------------------------------------------- /tests/fixtures/durable-usage.state.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanand0/aipipe/HEAD/tests/fixtures/durable-usage.state.json -------------------------------------------------------------------------------- /tests/fixtures/gemini-embedding.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanand0/aipipe/HEAD/tests/fixtures/gemini-embedding.json -------------------------------------------------------------------------------- /tests/fixtures/gemini-generate-stream.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanand0/aipipe/HEAD/tests/fixtures/gemini-generate-stream.json -------------------------------------------------------------------------------- /tests/fixtures/gemini-generate.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanand0/aipipe/HEAD/tests/fixtures/gemini-generate.json -------------------------------------------------------------------------------- /tests/fixtures/gemini.scenarios.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanand0/aipipe/HEAD/tests/fixtures/gemini.scenarios.json -------------------------------------------------------------------------------- /tests/fixtures/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanand0/aipipe/HEAD/tests/fixtures/index.js -------------------------------------------------------------------------------- /tests/fixtures/openai-chat-completions.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanand0/aipipe/HEAD/tests/fixtures/openai-chat-completions.json -------------------------------------------------------------------------------- /tests/fixtures/openai-embedding.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanand0/aipipe/HEAD/tests/fixtures/openai-embedding.json -------------------------------------------------------------------------------- /tests/fixtures/openai-responses-stream.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanand0/aipipe/HEAD/tests/fixtures/openai-responses-stream.json -------------------------------------------------------------------------------- /tests/fixtures/openai.scenarios.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanand0/aipipe/HEAD/tests/fixtures/openai.scenarios.json -------------------------------------------------------------------------------- /tests/fixtures/openrouter-budget-blocked.request.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanand0/aipipe/HEAD/tests/fixtures/openrouter-budget-blocked.request.json -------------------------------------------------------------------------------- /tests/fixtures/openrouter-chat-stream.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanand0/aipipe/HEAD/tests/fixtures/openrouter-chat-stream.json -------------------------------------------------------------------------------- /tests/fixtures/openrouter-chat.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanand0/aipipe/HEAD/tests/fixtures/openrouter-chat.json -------------------------------------------------------------------------------- /tests/fixtures/openrouter-chat.scenarios.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanand0/aipipe/HEAD/tests/fixtures/openrouter-chat.scenarios.json -------------------------------------------------------------------------------- /tests/fixtures/openrouter-invalid-salt.request.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanand0/aipipe/HEAD/tests/fixtures/openrouter-invalid-salt.request.json -------------------------------------------------------------------------------- /tests/fixtures/openrouter-missing-auth.request.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanand0/aipipe/HEAD/tests/fixtures/openrouter-missing-auth.request.json -------------------------------------------------------------------------------- /tests/fixtures/openrouter-models.scenarios.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanand0/aipipe/HEAD/tests/fixtures/openrouter-models.scenarios.json -------------------------------------------------------------------------------- /tests/fixtures/openrouter-options-custom.request.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanand0/aipipe/HEAD/tests/fixtures/openrouter-options-custom.request.json -------------------------------------------------------------------------------- /tests/fixtures/openrouter-options.request.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanand0/aipipe/HEAD/tests/fixtures/openrouter-options.request.json -------------------------------------------------------------------------------- /tests/fixtures/openrouter-success.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanand0/aipipe/HEAD/tests/fixtures/openrouter-success.json -------------------------------------------------------------------------------- /tests/fixtures/openrouter-unauthorized.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanand0/aipipe/HEAD/tests/fixtures/openrouter-unauthorized.json -------------------------------------------------------------------------------- /tests/fixtures/similarity-openai.response.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanand0/aipipe/HEAD/tests/fixtures/similarity-openai.response.json -------------------------------------------------------------------------------- /tests/fixtures/similarity.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanand0/aipipe/HEAD/tests/fixtures/similarity.json -------------------------------------------------------------------------------- /tests/fixtures/similarity.scenarios.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanand0/aipipe/HEAD/tests/fixtures/similarity.scenarios.json -------------------------------------------------------------------------------- /tests/helpers/scenario-runner.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanand0/aipipe/HEAD/tests/helpers/scenario-runner.js -------------------------------------------------------------------------------- /tests/native-api-key.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanand0/aipipe/HEAD/tests/native-api-key.test.js -------------------------------------------------------------------------------- /tests/providers.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanand0/aipipe/HEAD/tests/providers.test.js -------------------------------------------------------------------------------- /tests/proxy.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanand0/aipipe/HEAD/tests/proxy.test.js -------------------------------------------------------------------------------- /tests/readme.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanand0/aipipe/HEAD/tests/readme.test.js -------------------------------------------------------------------------------- /tests/scenarios.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanand0/aipipe/HEAD/tests/scenarios.test.js -------------------------------------------------------------------------------- /tests/smoke.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanand0/aipipe/HEAD/tests/smoke.test.js -------------------------------------------------------------------------------- /tests/test-helpers.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanand0/aipipe/HEAD/tests/test-helpers.js -------------------------------------------------------------------------------- /tests/usage.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanand0/aipipe/HEAD/tests/usage.test.js -------------------------------------------------------------------------------- /tests/vitest.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanand0/aipipe/HEAD/tests/vitest.config.js -------------------------------------------------------------------------------- /vitest.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanand0/aipipe/HEAD/vitest.config.js -------------------------------------------------------------------------------- /wrangler.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanand0/aipipe/HEAD/wrangler.toml --------------------------------------------------------------------------------