New models compatible with OpenHands - GLM-4.6 ...
# proj-agent
s
New models compatible with OpenHands • GLM-4.6 ◦ model = "litellm_proxy/openrouter/z-ai/glm-4.6" ◦ base_url = "https://llm-proxy.eval.all-hands.dev" • MiniMax-M2 ◦ using their own anthropic endpoint FYI @gentle-apple-32922 @limited-student-10747
🙌 3
g
Drafting socials ty
c
Have we tested MiniMax-M2 ?
I seem to see there's a request to add it to LiteLLM, but it hasn't been?
They've got some heat because of the choice to be Anthropic-API compatible
s
@calm-artist-7206 yes tested using their anthropic endpoint, it works well. I don't think there's a minimax litellm provider yet.
c
Out of curiosity, how did you test, do you mean with agent-sdk?
g
@limited-student-10747 do we keep how to connect to these models in our docs somewhere? I just feel dropping these base URLs and docs in the social post is a bit messy
l
you can see my other post: https://openhands-ai.slack.com/archives/C091TN9PPJ9/p1762462033059959?thread_ts=1762461772.150279&cid=C091TN9PPJ9 I think once something is confirmed to actually work well, then we can add it to the docs, but linking to the docs of the model provider’s (or openrouter’s) openai endpoint might be enough for an initial social post
sounds good sg 1
g
Socials are queued up for tomorrow
🎉 1
s
@calm-artist-7206 with CLI + integration tests + ran example_01 but with a much harder prompt that writing 3 facts in a txt
c
Yes but I wonder with what model name / base url / prefix of the model name? I'm curious how did litellm know (?) to transform the requests from Anthropic API, since it usually expects OpenAI-compatible API For example I think one Anthropic transformation is related to the system prompt, don't remember exactly what, like it needs sent specifically instead of being the first in the messages... Weird specific stuff, whatever it is, litellm needed to do it.
I'm not sure I've seen another major model offering on Anthropic API
It's just a curious choice
s
tested with base url https://api.minimax.io/anthropic, native api key and I think (litellm_proxy?)/anthropic/MiniMax-M2
About the linkedin blog, I am not sure if this is the best way of telling users how to configure glm-4.6
Copy code
GLM-4.6
• model = "litellm_proxy/openrouter/z-ai/glm-4.6"
• base_url = "https://lnkd.in/giHJxbMc"
Perhaps it should be
Copy code
model = openhands/openrouter/z-ai/glm-4.6
+ openhands api key (but perhaps no need to remind that?) @gentle-apple-32922
👀 1
c
base url https://api.minimax.io/anthropic, native api key and I think (litellm_proxy?)/anthropic/MiniMax-M2
Aha, clever! Thank you 😅
s
Perhaps it's also worth including the Minimax-m2 info @gentle-apple-32922
model = anthropic/MiniMax-M2
base_url="https://api.minimax.io/anthropic"
+ minimax api key
👀 1
g
UGH why does linkedin change the URLs!!!! shakes fist Better @strong-ice-84145 @calm-artist-7206? ty
c
I think we should remove the litellm_proxy from GLM?
It's proxy eval, it's not even exactly open publicly
Just openrouter/z-ai... etc, and no base url, should work
(because litellm knows openrouter and where it is)
Also, I don't think (?) the eval proxy works with OH API key
@gentle-apple-32922 what I mean is: the image looks incorrect. Instead: • openrouter/z-ai/glm-4.6 • openrouter key Alternatively, if you folks added it to the cloud OpenHands provider, then • it should start with
openhands/
... (probably openhands/glm-4.6) • OpenHands API key In both alternatives, no base url, I don't think?
g
Okay imma pull this and we can repost tomorrow with correct info I'll work on a new post and get approval before scheuduling
l
Thanks @gentle-apple-32922! No worries and I’d be happy to check the directions next time, we can also maybe write some characteristics of the models too.
g
If i have a template and some samples, I can definitely create & post successfully I think this may have been too vague for me to make the correct post 😅
l
Yeah, sorry, my bad, I should’ve created an example for the first one. Maybe I’ll just do that for this time
g
Okay what do we think of this? LinkedIn
We’re expanding OpenHands model support:
• GLM-4.6 (via OpenRouter)
• MiniMax-M2 (Anthropic-compatible endpoint)
This unlocks more choice for teams building with OpenHands. We’ll publish a follow-up with deeper evaluation and benchmarks soon.
In the meantime, give them a spin and let us know what you think!
GLM-4.6
• model = "/openrouter/z-ai/glm-4.6"
MiniMax-M2
• model = "anthropic/MiniMax-M2"
X
1/
OpenHands now supports two new models:
• GLM-4.6 (via OpenRouter)
• MiniMax-M2 (Anthropic-compatible endpoint)
Rolling this out today. We’ll share a deeper eval soon—stay tuned. ⚡
️
2/
GLM-4.6
• model = "/openrouter/z-ai/glm-4.6"
MiniMax-M2
• model = "anthropic/MiniMax-M2"
Do you want me to keep going for this one @limited-student-10747 or table it?
l
Have you tested if those model names work? I think the “anthropic” one might not work as-is
👀 1
I could test it out if you want
g
i can test i think... lemme go try 👍
Okay I think I need to spend time later todo and learn how to get these test models up and running to for me to test before posting socials. 😢 😅
👍 1
s
@limited-student-10747 I tested it it works!
👀 1
l
Thanks, so setting “LLM_MODEL=anthropic/MiniMax-M2” and “LLM_API_KEY={minimax-api-key}” works? Or do you also need to set base url?
s
This works with minimax m2 api key
Copy code
model = "anthropic/MiniMax-M2"

base_url = "https://api.minimax.io/anthropic"
llm = LLM(
    model=model,
    api_key=SecretStr(api_key),
    base_url="https://api.minimax.io/anthropic",
    usage_id="agent",
    log_completions=True,
)
🆗 1
🙏 1
g
So i wonder if the best way to show users is a screen shot? X and Linkedin create these redirect URLs
I think that is also why asked if we had a doc that has this there for the user thinky spin because then it's easier for them tor ead
Could you share the code block for the GLM-4.6 @strong-ice-84145 I can add it as a screenshot to the post also
c
To note, I suggest to remove
log_completions
from the example, and maybe also
usage_id
. They are not necessary to run, so it's keeping it simple.
sounds good sg 1
In fact, we also (re)made the
api_key
compatible with a simple string, so that line should just work like this too:
api_key=api_key,
👀 1
e
FYI there are some compelling advantages of using MiniMax M2 through OpenRouter. But to do so, you would need to use the OpenAI Chat Completions API instead of the Anthropic API. They recently partnered to add special fields to input and output for this: https://x.com/SkylerMiao7/status/1986243863775002689 @limited-student-10747 is taking a look; hopefully we can get this added 🤩
l
@echoing-garage-24541 if you could test this it seems like it’d work based on OpenHands’s assessment of how litellm handles things: https://github.com/OpenHands/software-agent-sdk/pull/1152
e
I will take a look later (my system is unstable to run it at the moment 😬 ) and will provide feedback as soon as I can. Thanks!
🙏 1
looking at the PR comments & changes, though, it seems it's looking for
reasoning
to transform to
reasoning_content
instead of reading
reasoning_details
🤔