feat(provider): support custom prompts for model tests (#242)

This commit is contained in:
RWDai
2026-03-19 13:11:54 +08:00
committed by GitHub
parent b570aaac48
commit ddd6adbcf7
8 changed files with 164 additions and 46 deletions

View File

@@ -117,13 +117,17 @@ export function useModelTest(options: UseModelTestOptions) {
startPolling(reqId)
try {
const normalizedMessage = typeof params.message === 'string' && params.message.trim()
? params.message.trim()
: undefined
const result = await testModelFailover({
provider_id: providerId(),
mode: params.mode,
model_name: params.modelName,
api_format: params.apiFormat,
endpoint_id: params.endpointId,
message: params.message ?? 'hello',
...(normalizedMessage ? { message: normalizedMessage } : {}),
request_id: reqId,
concurrency: params.concurrency,
}, {