{"id":15408511,"url":"https://github.com/yusukebe/get-platform-proxy-cloudflare-ai","last_synced_at":"2025-04-18T23:43:00.847Z","repository":{"id":222805913,"uuid":"758429645","full_name":"yusukebe/get-platform-proxy-cloudflare-ai","owner":"yusukebe","description":null,"archived":false,"fork":false,"pushed_at":"2024-02-16T09:59:15.000Z","size":21,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-29T06:42:25.078Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yusukebe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-16T09:57:07.000Z","updated_at":"2024-03-10T19:47:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"3a154ebc-570a-4766-a521-b4036a17c5d1","html_url":"https://github.com/yusukebe/get-platform-proxy-cloudflare-ai","commit_stats":{"total_commits":3,"total_committers":1,"mean_commits":3.0,"dds":0.0,"last_synced_commit":"a50c5e59cef4d4f8e8c8d5c26f44f1a1eed89c5f"},"previous_names":["yusukebe/get-platform-proxy-cloudflare-ai"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yusukebe%2Fget-platform-proxy-cloudflare-ai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yusukebe%2Fget-platform-proxy-cloudflare-ai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yusukebe%2Fget-platform-proxy-cloudflare-ai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yusukebe%2Fget-platform-proxy-cloudflare-ai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yusukebe","download_url":"https://codeload.github.com/yusukebe/get-platform-proxy-cloudflare-ai/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249565262,"owners_count":21292427,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-01T16:34:20.189Z","updated_at":"2025-04-18T23:43:00.841Z","avatar_url":"https://github.com/yusukebe.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `getPlatformProxy()` + `@cloudflare/ai`\n\nError when using `getPlatformProxy()` and `@cloudflare/ai` together.\n\n## How to reproduce\n\n1. Clone this repository.\n2. `npm i`\n3. `npm run start`\n\n## Error message\n\n```\n$ tsx src/index.mts\n/Users/yusuke/work/c/fetch-duplex/node_modules/wrangler/wrangler-dist/cli.js:29572\n            throw a;\n            ^\n\nTypeError: RequestInit: duplex option is required when sending a body.\n    at new Request (/Users/yusuke/work/c/fetch-duplex/node_modules/undici/lib/fetch/request.js:491:15)\n    at Request (/Users/yusuke/work/c/fetch-duplex/node_modules/miniflare/src/http/request.ts:34:3)\n    at ProxyStubHandler.#fetcherFetchCall (/Users/yusuke/work/c/fetch-duplex/node_modules/miniflare/src/plugins/core/proxy/client.ts:594:19)\n    at ProxyStubHandler.#call (/Users/yusuke/work/c/fetch-duplex/node_modules/miniflare/src/plugins/core/proxy/client.ts:501:52)\n    at Proxy.fetch (/Users/yusuke/work/c/fetch-duplex/node_modules/miniflare/src/plugins/core/proxy/client.ts:484:25)\n    at InferenceSession.run (/Users/yusuke/work/c/fetch-duplex/node_modules/@cloudflare/ai/src/session.ts:72:28)\n    at Ai.run (/Users/yusuke/work/c/fetch-duplex/node_modules/@cloudflare/ai/src/ai.ts:113:44)\n    at \u003canonymous\u003e (/Users/yusuke/work/c/fetch-duplex/src/index.mts:7:25)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n\nNode.js v20.10.0\nerror Command failed with exit code 7.\ninfo Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.\n```\n\n## Work-around\n\nAdding `duplex:'half'` to fetch option in the `@cloudflare/ai` solves the problem.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyusukebe%2Fget-platform-proxy-cloudflare-ai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyusukebe%2Fget-platform-proxy-cloudflare-ai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyusukebe%2Fget-platform-proxy-cloudflare-ai/lists"}