| description | How to setup, debug, and execute the DeepSeek Playwright API proxy |
|---|
This workflow manages the local Enterprise Reverse Proxy, mapping strict OpenAI POST /v1/chat/completions API queries to dynamic Playwright scraping on Microsoft Edge.
Ensure you are inside deepseek-proxy/ and execute the following:
npm install express cors dotenv playwrightThe BrowserManager (src/services/BrowserManager.js) inherently requires Microsoft Edge to bypass Google Bot Detection:
channel: process.env.PLAYWRIGHT_CHANNEL || 'msedge',- If the server crashes on boot, check the
.envconfiguration. - If Google blocks login, ensure stealth mode
navigator.webdriver=undefinedis loaded insideBrowserManager.js.
// turbo-all
cd c:\Users\jonub\Downloads\deepseek-proxy
node server.jsThe standard OpenAI payload maps perfectly inside src/controllers/chatController.js. Ask downstream testing agents to trigger it via:
curl -X POST http://localhost:3000/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{"model":"deepseek-web","messages":[{"role":"user","content":"Ping!"}]}'Wait for the response! The proxy uses a Smart DOM length polling loop and only scrapes when the text length has stayed identical for 3 consecutive seconds.