Skip to content

feat(studio): allow manual model input for custom services#301

Open
jiashuaiLu wants to merge 1 commit into
Narcooo:masterfrom
jiashuaiLu:feat/manual-model-for-custom-services
Open

feat(studio): allow manual model input for custom services#301
jiashuaiLu wants to merge 1 commit into
Narcooo:masterfrom
jiashuaiLu:feat/manual-model-for-custom-services

Conversation

@jiashuaiLu

Copy link
Copy Markdown

Problem

Custom OpenAI-compatible endpoints (e.g. JD Cloud, private deployments) often do not expose a /models endpoint. The current Studio UI only supports auto-discovered models, making it impossible to configure and use such providers.

Solution

Add a Model ID (optional) input field to the custom service configuration page. When filled, the value is passed as preferredModel to the backend probe logic, which uses it as a fallback candidate if the /models list is empty.

Changes

  • ServiceDetailPage.tsx: add manualModel state, input field in the custom service form, and wire it to test/save handlers
  • service-detail-state.ts: extend probeServiceForDetail and saveServiceConfig to accept and forward manualModel
  • server.ts: accept manualModel in the /services/:service/test POST body and pass it to probeServiceCapabilities.preferredModel

How to test

  1. Go to Studio → 模型配置 → 添加自定义服务
  2. Fill Base URL and API Key
  3. Fill Model ID with a known model name (e.g. kimi-k2.5)
  4. Click "测试连接" — it should succeed even if the provider has no /models endpoint
  5. Save and use the service normally

Add a manual Model ID input field in the custom service configuration page.
This enables users to specify a model when the provider does not support
the /models endpoint (e.g. JD Cloud, private deployments).

Changes:
- ServiceDetailPage.tsx: add manualModel state, input field, and wiring
- service-detail-state.ts: propagate manualModel to probe and save APIs
- server.ts: accept manualModel in /services/:service/test and pass it
to probeServiceCapabilities as preferredModel

Closes: inability to use custom OpenAI-compatible endpoints without /models
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