Skip to content

feat(models): support responses custom endpoints - #29

Open
jacisko wants to merge 1 commit into
join3r:mainfrom
jacisko:feat/openai-responses-custom-provider
Open

jacisko wants to merge 1 commit into
join3r:mainfrom
jacisko:feat/openai-responses-custom-provider

Conversation

@jacisko

@jacisko jacisko commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Custom endpoints currently have no way to select OpenAI Responses. Models that require it are configured as Chat Completions instead.

This adds openai-responses to the API flavor selector, IPC validation, settings persistence, and generated pi configuration. OpenAI endpoints retain their /v1 prefix; Responses uses pi's native protocol defaults rather than Chat Completions compatibility overrides.

Auto-detection probes the Responses route too. Multiple detected routes now require an explicit API selection instead of silently choosing Chat Completions. Single-route detection and the existing no-route fallback are preserved. Ollama and LM Studio remain on Chat Completions. Existing saved configurations are not migrated automatically.

The UI explains that Test connection checks model listing, not inference compatibility.

Verification

  • npm test -- tests/unit/responses-integration.test.ts tests/unit/models-config.test.ts tests/unit/settings.test.ts: 139 passed.
  • npm run typecheck and npm run lint: passed.
  • Real pi RPC subprocess, generated models.json, loopback Responses mock: authenticated POSTs, streamed tool arguments, tool execution, result replay, and final text verified.
  • Negative case: listing succeeds, but a rejected Responses turn surfaces a provider error.
  • The happy-path integration test copied to unchanged main at 40d6d4a fails because pi posts to /openai/v1/chat/completions; with this patch it passes using /openai/v1/responses.

Validation limits

Latest full-suite run: 3,828 passed, 2 failed, 4 skipped. The scheduler test at tests/unit/scheduler.test.ts:449 expects ok but sees running; the same failure reproduced on unchanged main with the same dependencies. A past-chat rendering test timed out at five seconds and passed on a focused rerun. Full-suite green is not claimed.

Tests ran locally on macOS with Node 26.9.0 and pi 1.1.0, using the existing installed dependency tree rather than a fresh npm ci. No dependency or lockfile changes are included. The mock verifies generated-config-to-pi protocol wiring, not compatibility with a live Responses endpoint or the full Stem UI/runtime path.

Require explicit API selection when multiple routes answer: route availability does not establish model compatibility.
@jacisko
jacisko force-pushed the feat/openai-responses-custom-provider branch from 478a768 to 2a0def1 Compare October 30, 2026 20:41
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