mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-22 01:55:27 -04:00
GPUStack STT model call error #892
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @yanhelin on GitHub (Dec 22, 2025).
Self Checks
Dify version
1.8.1
Plugin version
GPUStack 0.0.8
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
Calling the model: faster-whisper-large-v3
curl -X POST 'http://xxxxxx/v1/audio-to-text'
--header 'Authorization: Bearer {api_key}'
--form 'file=@localfile;type=audio/[mp3|mp4|mpeg|mpga|m4a|wav|webm]
{
"code": "completion_request_error",
"message": "[gpustack] Error: req_id: f942727304 PluginInvokeError: {"args":{"description":"[models] Error: 'text'"},"error_type":"InvokeError","message":"[models] Error: 'text'"}",
"status": 400
}
✔️ Error log
2025-12-23 04:31:18.949 ERROR [Dummy-190] [base.py:211] - Error in stream reponse for plugin {'code': -500, 'message': '{"message":"{\"args\":{\"description\":\"[models] Error: 'text'\"},\"error_type\":\"InvokeError\",\"message\":\"[models] Error: 'text'\"}","error_type":"PluginInvokeError","args":null}', 'data': None}
@dosubot[bot] commented on GitHub (Dec 22, 2025):
Hi @yanhelin! I'm Dosu and I’m helping the dify-official-plugins team.
The error happens because the GPUStack plugin expects the backend to return a JSON response with a top-level
"text"key (for example,{ "text": "..." }). If the backend returns a different schema—like using"result"or another field instead—the plugin raises a KeyError, which surfaces as[models] Error: 'text'in Dify's error handling. This is not caused by your request parameters or audio file, but by the backend response not matching the OpenAI-compatible schema the plugin expects.To resolve this, make sure your GPUStack backend returns a response with a
"text"key for speech-to-text requests. If you can't change the backend, you would need to patch the plugin to accept the actual key used in the response. There are no config options or recent plugin updates that address this schema mismatch—it's a hardcoded expectation in the plugin code (reference).You can keep an eye on the open issue for updates, but for now, aligning the backend response schema is the most direct fix.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other
@yanhelin commented on GitHub (Dec 23, 2025):
Thank you! Below is the result returned by my test of gpustack's stt interface. Please help me check it again:
Request:
curl http://10.42.110.149/v1/audio/transcriptions
-H "Content-Type: multipart/form-data"
-H "Authorization: Bearer ${YOUR_GPUSTACK_API_KEY}"
-F model="faster-whisper-large-v3"
-F file="@/path/to/file/audio.mp3;type=audio/mpeg"
-F language=""auto""
Response:
{
"text": "xxxxx"
}
This is the code under the gpustack plugin:
class GPUStackSpeechToTextModel(OAICompatSpeech2TextModel):
"""
Model class for GPUStack Speech to text model.
"""
@dosubot[bot] commented on GitHub (Dec 23, 2025):
Your backend response format (
{"text": "xxxxx"}) is correct and matches exactly what the plugin expects. The plugin code simply parses the JSON and returns the value at the top-level"text"key—if that key is missing, it raises the error you're seeing. There are no intermediate steps or schema transformations in the plugin logic that could cause this error if the backend response is truly as shown (source).Given this, the most likely causes are:
{"text": ...}at runtime (for example, due to a proxy, encoding, or environment issue).To troubleshoot:
requests.post) from inside the same Docker container/environment as the plugin to replicate the plugin's request and confirm the response is as expected.If the raw response is correct and the error still occurs, please share the exact response (including headers) received by the plugin for further analysis.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other
@yanhelin commented on GitHub (Dec 24, 2025):
The result of my packet capture inside the plugin container:
Request:
......r.POST /v1/audio/transcriptions HTTP/1.1
Host: 10.42.110.149
User-Agent: python-requests/2.32.5
Accept-Encoding: gzip, deflate
Accept: /
Connection: keep-alive
Authorization: Bearer gpustack_eedc1226a9906178_caca875c357a0e86dba299218e5955a7
Content-Length: 219337
Content-Type: multipart/form-data; boundary=2e8e6e087f7690f8c1c51551170ab776
Response:
{"status_code":400,"detail":"Unsupported file format: None","headers":null}
@dosubot[bot] commented on GitHub (Jan 10, 2026):
Hi, @yanhelin. I'm Dosu, and I'm helping the dify-official-plugins team manage their backlog and am marking this issue as stale.
Issue Summary:
Next Steps:
Thank you for your understanding and contribution!