Skip to main content
luke@terminal:/$ ls
luke@terminal:/projects/doai-proxy$ cat doai-proxy.md

DOAI Proxy

[archived](github)

Definitely OpenAI. (It's definitely not.)

OpenAI-compatible API proxy that adds streaming and function calling to providers that support neither

stats:

github:
2stars
2forks
stack:
JavaScript
Express
Node.js
Docker
links:

background:

I wanted to use Straico as a provider in Opencode, but Straico's API doesn't support streaming or function calling — two things Opencode relies on heavily. The gap between "almost OpenAI-compatible" and "actually works" was surprisingly small, but those two missing features were complete blockers. So I built a proxy to bridge that gap.

why:

This started as a practical need — I wanted Straico as an option in Opencode without waiting for either side to add support. It turned into something more interesting though: figuring out how to fake streaming convincingly, and how to inject tool definitions into prompts so the AI responds in a parseable format. The kind of problem that sounds simple until you actually try to solve it.

struggles:

[challenge]Tool calling via prompt injection is fragile — the AI has to follow an exact format for calls to be detected
[challenge]Streaming modes went through three iterations before settling on two (none and smart) — the third had no legitimate use case
[challenge]Token cap issues with Straico took a few attempts to work around
[challenge]Error handling and edge cases kept surfacing after the initial build — network errors, empty messages, auth timing attacks
[learning]Simulated streaming is honest about being fake — the none mode just sends the response, no artificial delays, no pretending
[learning]Building a provider abstraction layer early paid off — it forced clean boundaries between proxy logic and provider specifics

timeline:

2026-02-04Project initialised with Express server, health check, streaming simulation, and function calling — rapid first night of hacking
2026-02-05Added validation, async operations, improved error handling. Cleaned up planning artefacts.
2026-02-08Extracted provider abstraction layer, added authentication system and log rotation
2026-02-08Fixed tool calling implementation — multiple attempts to get prompt injection parsing reliable
2026-02-09Added tests, fixed token cap issues, auto-populated Opencode provider config
2026-02-10Iterated on streaming — implemented 3-mode system, then removed the third mode when it had no use case
2026-02-20Security and reliability pass — proper HTTP status codes, HTTPS connection pooling, timing-safe auth, graceful shutdown
2026-04-13Dusted off after ~7 weeks on the bench while I focused on Projex and lukemanning.ie. Rebranded to DOAI Proxy.
2026-08-07Straico shut down. The proxy has nothing left to proxy — archived. Repo kept up for reference.
luke@terminal:/projects/doai-proxy$ git log --oneline -5
84de202README Updates (#14)2026-04-15T14:43:35Z
c2741a9Fix test bug, add CI workflow (#13)2026-04-15T14:10:41Z
41f949cDockerfile fixes2026-04-15T01:31:04Z
41d8ba1Docker build fix2026-04-15T01:14:40Z
07e2641Fixes for model limits and config sync2026-04-15T01:07:34Z