Skip to content

feat: add model connectivity testing endpoints#40

Merged
chenyme merged 1 commit into
devfrom
model_test
May 24, 2026
Merged

feat: add model connectivity testing endpoints#40
chenyme merged 1 commit into
devfrom
model_test

Conversation

@chenyme

@chenyme chenyme commented May 24, 2026

Copy link
Copy Markdown
Contributor

Summary

Add admin-side model testing for platform models and upstream route bindings. Platform models now support Test all, which probes all active matching upstream routes and lets admins switch between each result in the dialog. The dialog shows sanitized request/response details, latency, status code, protocol, endpoint, and supports deleting the current upstream model binding with confirmation.

Also refined the model management table UI: left-align model type tags and keep image protocol ordering stable as Images Generations before Images Edits.

Change type

  • Bug fix
  • Feature
  • Documentation
  • Refactor
  • Configuration / deployment
  • Security hardening
  • Other

Affected areas

  • Frontend / UI
  • Backend / API
  • Authentication / authorization
  • Conversations / streaming
  • Files / RAG / extraction
  • Model routing / providers
  • MCP / tools
  • Billing / payments
  • Admin console
  • Deployment / Docker / configuration
  • Documentation

Verification

  • cd backend && go test ./...
  • cd backend && make swagger
  • pnpm --dir frontend lint
  • pnpm --dir frontend exec tsc --noEmit
  • git diff --check

Screenshots, API examples, or logs

Admin API changes:

  • POST /api/v1/admin/llm/models/{id}/test-all
  • POST /api/v1/admin/llm/models/{id}/test
  • POST /api/v1/admin/llm/upstreams/{id}/models/{route_id}/test

Debug output is sanitized before returning to the frontend.

Configuration, migration, and compatibility notes

Configuration changes: None.

API changes: Adds platform model batch test endpoint. Existing single model and upstream route test endpoints remain available.

Database migrations: None.

Deployment changes: None.

Backward compatibility: Existing model routing and upstream configuration behavior is unchanged.

Documentation

  • Documentation is not needed for this change.
  • Documentation was updated.
  • Documentation still needs to be updated.

Swagger docs were regenerated.

Security and privacy

  • No secrets, tokens, credentials, local config, or personal data are included.
  • User data access remains scoped by authenticated user context unless an admin-only path explicitly requires broader access.
  • Security-sensitive behavior was reviewed, including authentication, authorization, provider routing, file processing, billing, and admin APIs where relevant.

Model test debug output redacts API keys, Authorization headers, sensitive headers, Base URL, and upstream host before returning to admins.

Checklist

  • I searched existing issues and pull requests.
  • Changes are focused and do not include unrelated refactors.
  • Tests or static verification were run where practical.
  • User-facing behavior, deployment steps, API contracts, or configuration changes are documented.
  • Generated artifacts are included only when this project explicitly requires them.
  • Caches, build output, .pyc files, .env files, and local storage data are not committed.

@chenyme chenyme linked an issue May 24, 2026 that may be closed by this pull request
3 tasks
@chenyme
chenyme merged commit 6d2c62d into dev May 24, 2026
2 checks passed
@chenyme
chenyme deleted the model_test branch May 24, 2026 07:13
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.

[Feature]: 在管理控制台中添加模型可用性测试

1 participant