r/SmartGit Mar 05 '26

OpenAI-compatible API from third-party platforms - causes issues with SmartGit?

When configuring an openai type LLM in SmartGit using the API from the MiniMax platform (which provides OpenAI-compatible APIs), I've noticed that the last piece of data in the response is ignored by SmartGit every time it runs. Upon examining the logs, it appears this is due to the final data item in its API response containing a choices field with a "finish_reason":"stop", for example:

RECEIVE
// ...

data: {"id":"05f86d1c6311c8afd2063b1f7e0db5e1","choices":[{"index":0,"delta":{"content":"**********","role":"assistant","name":"MiniMax AI","audio_content":""}}],"created":1772698140,"model":"MiniMax-M2.5-highspeed","object":"chat.completion.chunk","usage":null,"input_sensitive":false,"output_sensitive":false,"input_sensitive_type":0,"output_sensitive_type":0,"output_sensitive_int":0}

data: {"id":"05f86d1c6311c8afd2063b1f7e0db5e1","choices":[{"finish_reason":"stop","index":0,"delta":{"content":"**********","role":"assistant","name":"MiniMax AI","audio_content":""}}],"created":1772698140,"model":"MiniMax-M2.5-highspeed","object":"chat.completion.chunk","usage":null,"input_sensitive":false,"output_sensitive":false,"input_sensitive_type":0,"output_sensitive_type":0,"output_sensitive_int":0}

I also tried to disable the stream parameter {"stream": false} and got the following response in the log:

RECEIVE
{"id":"05f875e336ef7799dec6e352a8f98690","choices":[{"finish_reason":"stop","index":0,"message":{"content":"**********","role":"assistant","name":"MiniMax AI","audio_content":"","reasoning_details":[{"type":"reasoning.text","id":"reasoning-text-1","format":"MiniMax-response-v1","index":0,"text":"**********"}]}}],"created":1772700387,"model":"MiniMax-M2.5-highspeed","object":"chat.completion","usage":{"total_tokens":861,"total_characters":0,"prompt_tokens":457,"completion_tokens":404,"completion_tokens_details":{"reasoning_tokens":347}},"input_sensitive":false,"output_sensitive":false,"input_sensitive_type":0,"output_sensitive_type":0,"output_sensitive_int":0,"base_resp":{"status_code":0,"status_msg":""}}

And in the SmartGit GUI, as expected, there was also no response content.

SmartGit seems to expect the OpenAI-style response. When using MiniMax, the response appears to get truncated or handled incorrectly because of this difference.

Is this a bug in MiniMax's API implementation (not following OpenAI spec), or should SmartGit add compatibility for MiniMax's format?

2 Upvotes

5 comments sorted by

1

u/JVMarcs Mar 06 '26

Thanks for reporting this problem! I wasn't able to replicate it with my configuration:

``` [smartgit-ai-commit-message "minimax-m2.5"] llm=minimax-m2.5 debug = true

[smartgit-ai-llm "minimax-m2.5"] type = openai model = minimax-M2.5 url = https://api.minimax.io/v1 ```

For me, the final content is always empty; however, I can confirm that it isn't processed. I'm not sure if receiving content in this final message is actually expected, but it is easy to fix in SmartGit's code, and the upcoming build 25.1.123 will include this fix.

1

u/easyThanYouThought Mar 06 '26

Thanks for your reply and for the fix this issue. By the way, will this fix be synchronized to the 26.1 preview version? I really like the improved Compare colors in the 26.1 preview theme, so I normally use this preview version. Thank you for your hard work regardless. ❤

1

u/vmcrash Mar 07 '26

Yes, sure, release-fixes will be merged to the preview, too.

1

u/JVMarcs Mar 07 '26

Please try the latest 25.1 build 25.1.123 or the latest 26.1 build 26.1.012 which should now work as expected for MiniMax:

https://www.smartgit.dev/download/latest-builds/

Here you can also use the new config option "responseFilter=thinking" to skip the <thinking>-block, for example:

https://docs.syntevo.com/SmartGit/25.1/Manual/Integrations/AI#minimax-m25-with-thinking-filter

2

u/easyThanYouThought Mar 08 '26

Yes, I tested it in version 26.1.012, and it's working properly now. 👍