About the `FUNCTION_CALLING_PATTERN` in <https://g...
# proj-sdk
s
About the
FUNCTION_CALLING_PATTERN
in https://github.com/OpenHands/agent-sdk/blob/93ce4fb7eeb607ba339a82ebb7f593389069308d/openhands-sdk/openhands/sdk/llm/utils/model_features.py Should we make function calling the default and only keep a list of models that don't support function calling? Why? Because right now if I want to try out a new model that supports openai/anthropic endpoints via the CLI, most likely (... how likely?) the model will support function calling so I need to add it to the list else the parsing of the llm tool commands will fail. So I need to merge a PR on
agent-sdk
+ make sure the CLI links to the lasted
agent-sdk
main to take into account those changes -> time consuming.
c
🤔 yeah agree. we can maybe by default assume native function calling, and make non native function calling a flag/argument the user can pass to LLM class. We keep the "supported list" because back in the old days, fn call models were rare (and it is the opposite today_ And later when users are actually running into errors, we advise them to enable that in the error message of corresponding exceptions - wdyt? Love to hear what @calm-artist-7206
s
started with this issue to inverse the default with a list of the opposite. Not even sure what model to add to that list 😛
c
ahhh i mean we should not maintain that list though - we should just by default always do fn call, and if there's a model that doesn't support fn call, it should be the user's responsibility to toggle the switch in the UI or set function_calling=false in the LLM kwarg. @nutritious-balloon-65098 please create a github issue based on this on OpenHands/agent-sdk repo
n
I'm on it! Xingyao Wang can track my progress here.
Summary I've successfully created a GitHub issue on the OpenHands/agent-sdk repository based on your request. What Was Created GitHub Issue #955: "Default to function calling enabled, remove FUNCTION_CALLING_PATTERNS allowlist" 🔗 Link: https://github.com/OpenHands/agent-sdk/issues/955 Key Details The issue proposes a more streamlined approach than the existing #952: • Current Problem: The
FUNCTION_CALLING_PATTERNS
allowlist in
model_features.py
requires users to submit PRs just to try new models, creating unnecessary friction • Proposed Solution: Default to function calling enabled for ALL models, and remove the allowlist entirely • User Control: If a model doesn't support function calling, users can disable it via: ◦ UI toggle switch, OR ◦
function_calling=false
in LLM kwargs • Error Handling: Provide helpful error messages guiding users to disable function calling when needed Rationale • Most modern models support function calling (opposite of when the list was created) • Eliminates maintenance burden of keeping the list updated • Enables faster experimentation without waiting for PRs to merge • Better user experience for trying new models The issue has been created with the "enhancement" label and is ready for team discussion and implementation. <sub>View full conversation</sub>
l
Yeah, I was discussing with Simon about this and agree!
c
I remember in the good old days, Gemini had 1% on SWE-bench with tool calling 🤣 That's basically why the list existed - because users would have had a worse experience - but it's not true anymore. Let's kill it