Skip to content

feat: generic background Responses API providers — sference backend#32

Open
apejcic wants to merge 1 commit into
aattaran:mainfrom
apejcic:feat/background-responses-providers
Open

feat: generic background Responses API providers — sference backend#32
apejcic wants to merge 1 commit into
aattaran:mainfrom
apejcic:feat/background-responses-providers

Conversation

@apejcic

@apejcic apejcic commented Jun 11, 2026

Copy link
Copy Markdown

Adds a 'responses-bg' backend type to the proxy: Anthropic /v1/messages
requests are translated to POST /v1/responses with background:true and
metadata.completion_window, polled to completion, and synthesized back
as Anthropic SSE (with ping keepalive). Tool calls try native OpenAI
function format first and fall back to prompt-based emulation on 400.

sference.com is registered as a regular backend (-b sf, default model
moonshotai/Kimi-K2.6, window via -w/SFERENCE_COMPLETION_WINDOW), plus
an env-configurable custom provider (BG_PROVIDER_*). New /_proxy/window
control endpoint; /_proxy/status now reports type, window, tool_mode.

Also: proxy logs moved to stderr so launchers read a clean port from
stdout, origin guard applied to all control POST endpoints, http
upstreams supported for self-hosted providers, and macOS-safe ms
timing in the benchmark.

Adds a 'responses-bg' backend type to the proxy: Anthropic /v1/messages
requests are translated to POST /v1/responses with background:true and
metadata.completion_window, polled to completion, and synthesized back
as Anthropic SSE (with ping keepalive). Tool calls try native OpenAI
function format first and fall back to prompt-based emulation on 400.

sference.com is registered as a regular backend (-b sf, default model
moonshotai/Kimi-K2.6, window via -w/SFERENCE_COMPLETION_WINDOW), plus
an env-configurable custom provider (BG_PROVIDER_*). New /_proxy/window
control endpoint; /_proxy/status now reports type, window, tool_mode.

Also: proxy logs moved to stderr so launchers read a clean port from
stdout, origin guard applied to all control POST endpoints, http
upstreams supported for self-hosted providers, and macOS-safe ms
timing in the benchmark.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant