You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @codelion — I'd like to pick this up. The built-in inference server currently only exposes the chat protocol at optillm/server.py/v1/chat/completions (server.py:759); there is no legacy text-completions route.
Plan: extract the request-parsing/dispatch core of proxy() into a shared internal helper (no behavior change for chat), then add POST /v1/completions that maps prompt → messages and returns the OpenAI legacy object: "text_completion" shape (choices[].text + usage, multiple choices for list prompts / n>1). Stream: first version returns 400 with a clear message (can follow up). Offline unit tests via server.app.test_client() following tests/test_approaches.py. PR incoming shortly — please confirm the first-version scope looks right.
Activity
akushonkamen commentedon Oct 10, 2026
Hi @codelion — I'd like to pick this up. The built-in inference server currently only exposes the chat protocol at
optillm/server.py/v1/chat/completions(server.py:759); there is no legacy text-completions route.Plan: extract the request-parsing/dispatch core of
proxy()into a shared internal helper (no behavior change for chat), then addPOST /v1/completionsthat mapsprompt→ messages and returns the OpenAI legacyobject: "text_completion"shape (choices[].text + usage, multiple choices for list prompts / n>1). Stream: first version returns 400 with a clear message (can follow up). Offline unit tests viaserver.app.test_client()followingtests/test_approaches.py. PR incoming shortly — please confirm the first-version scope looks right.feat(server): add legacy /v1/completions endpoint for the inbuilt inf…