ferdiunal/freebuff-proxy — reverse-engineered prompt
Reverse engineered prompt
Build me a small local proxy service in Go that lets me use my Freebuff or Codebuff account like a normal OpenAI style or Anthropic style API.
I want a simple CLI where I can run login, open the browser link, save the credential file locally, then run serve to start the proxy, and logout to clear the session and local credentials when I am done. The service should read settings from a project .env file, let me choose the listen address, model name, API base URL, credential file path, and an optional local API key for protecting the proxy.
Please expose endpoints for health, models, chat completions, messages, and count tokens. Chat requests should accept both OpenAI shaped and Anthropic shaped payloads, forward them through the Freebuff session flow, keep the session alive, and return normal non streaming and streaming responses in the format those clients expect.
Please include a Docker option, a few make commands for build, run, test, and smoke checks, and sensible defaults for local use. Look up current docs online if you need to.
Want more depth? Deep Reverse