OpenFunctions

Gorilla OpenFunctions is a drop-in open-source alternative to proprietary function-calling APIs, designed for developers who need to reliably map natural-language prompts to structured API calls without vendor lock-in.

Reviewed by 7wData

On this page

Publisher review

Gorilla OpenFunctions is a drop-in open-source alternative to proprietary function-calling APIs, designed for developers who need to reliably map natural-language prompts to structured API calls without vendor lock-in. It targets engineers building agentic workflows, tool-using LLM applications, or multi-provider integrations who want a single, unified interface for function calling. Created by the Gorilla LLM team at UC Berkeley, OpenFunctions returns correctly formatted function calls given a prompt and API definition, supporting parallel function calling—a capability that allows the model to output multiple function invocations in a single response, as noted in community discussions comparing tools versus functions performance. The model scores 59.22% on the Berkeley Function Calling Leaderboard (BFCL), placing it 7th overall alongside GPT-5, according to Klavis AI's 2025 benchmark analysis. This open-weight model is free to use and can be self-hosted or accessed via Hugging Face, making it a practical choice for teams that need predictable, auditable function-calling behavior without per-token costs.

OpenFunctions works by accepting a user prompt and an API schema (e.g., a JSON description of available functions) and outputting a correctly formatted function call—including arguments—that can be directly executed. The model supports parallel function calling, meaning it can generate multiple distinct function invocations in one turn, which is critical for complex agentic tasks like querying multiple data sources simultaneously. It is built on the Gorilla framework and is available as gorilla-llm/gorilla-openfunctions-v2 on Hugging Face, with the Berkeley Function Calling Leaderboard providing evaluation code and rankings. The unified API format means developers write one integration instead of adapting to each provider's quirks, and the built-in model routing and ranking (inspired by OpenRouter's approach) simplifies provider selection. However, the model's BFCL score of 59.22% indicates it trails top proprietary models like GPT-5 (also 59.22%) and others that score higher, reflecting a trade-off between openness and raw accuracy.

In the market, OpenFunctions competes directly with OpenAI's Function Calling API, LangChain's tools/agents, and OpenRouter. OpenAI's solution is faster and easier to use per Reddit users, but it is proprietary and incurs per-token costs. LangChain's tools/agents offer flexibility but require more boilerplate and configuration. OpenRouter provides a single key and unified API format with built-in routing, but it is a gateway service, not a model you can self-host. OpenFunctions differentiates by being fully open-source and free, with a drop-in design that mimics the same API pattern as proprietary solutions, enabling easy migration. Its 7th-place BFCL ranking shows it is competitive but not state-of-the-art; for example, GPT-5 and other closed models achieve higher accuracy on complex function-calling benchmarks, making OpenFunctions better suited for cost-sensitive or privacy-conscious deployments where top-tier accuracy is not mandatory.

The honest trade-offs: OpenFunctions' 59.22% BFCL score means it will make more errors than top proprietary models on nuanced or multi-step function calls, potentially requiring fallback logic or retry mechanisms. Being open-source, it lacks the managed infrastructure, automatic updates, and SLA guarantees of cloud APIs—users must handle hosting, scaling, and model updates themselves. Parallel function calling is supported, but the model's reliability in generating correct parallel invocations may be lower than OpenAI's tools endpoint, which was specifically designed for this. Finally, the ecosystem around OpenFunctions is smaller than LangChain's or OpenAI's, meaning fewer community integrations, tutorials, and third-party tooling, which can increase development time for complex agentic systems.

Get the AI & data signal, daily.

335k+ subscribers read this every morning. One email, both newsletters. Unsubscribe anytime.

How it works

  1. Drop-in open-source alternative

    Replaces proprietary function-calling APIs with a self-hostable model that returns correctly formatted calls from prompts and API schemas.

  2. Parallel function calling

    Outputs multiple distinct function invocations in a single response, enabling simultaneous tool use for complex agentic tasks.

  3. Unified API format

    Provides a single integration interface that works across providers, eliminating the need to adapt to each vendor's authentication quirks.

  4. Built-in model routing

    Includes ranking and routing logic to select the best model for a given function-calling request, inspired by OpenRouter's approach.

  5. Free and open-weight

    No per-token costs or licensing fees; the model weights are publicly available on Hugging Face for self-hosting or fine-tuning.

  6. BFCL benchmark ranking

    Scores 59.22% on the Berkeley Function Calling Leaderboard, placing 7th overall alongside GPT-5 as of 2025.

  7. Single-key authentication

    Uses one API key for all function-calling requests, simplifying credential management compared to multi-provider setups.

Strengths and trade-offs

Strengths

  • OpenFunctions is free and open-weight, eliminating per-token costs and enabling self-hosting for privacy-sensitive applications.
  • It supports parallel function calling, allowing multiple API invocations in one response, which is critical for complex agentic workflows.
  • The unified API format and single-key authentication reduce integration overhead, as developers do not need to manage multiple provider credentials.
  • Its 59.22% BFCL score places it competitively alongside GPT-5, offering a viable open-source alternative for many production use cases.

Trade-offs

  • With a 59.22% BFCL score, OpenFunctions is less accurate than top closed models like GPT-5 on nuanced or multi-step function calls.
  • Being open-source, it lacks managed hosting, automatic updates, and SLA guarantees, requiring users to handle infrastructure and scaling.
  • Parallel function calling reliability may be lower than OpenAI's tools endpoint, which was specifically optimized for this capability.
  • The ecosystem of community integrations, tutorials, and third-party tooling is smaller than LangChain's or OpenAI's, increasing development effort.

Pricing context

Free and open-source; no per-token costs or licensing fees. Self-hosting requires compute resources (e.g., GPU inference).

Getting started with OpenFunctions

  1. Install OpenFunctions via pip

    Run `pip install gorilla-llm` in your Python environment to install the OpenFunctions package. Ensure you have Python 3.8+ and a compatible GPU if you plan to run inference locally.

  2. Load the model from Hugging Face

    Use the `transformers` library to load the model and tokenizer: `from transformers import AutoModelForCausalLM, AutoTokenizer; model = AutoModelForCausalLM.from_pretrained('gorilla-llm/gorilla-openfunctions-v2')`. This downloads the open-weight model for self-hosting.

  3. Define your API schema

    Create a JSON object describing the functions your application will call. Each function should include a name, description, and parameters with types. This schema tells OpenFunctions what actions are available.

  4. Generate a function call from a prompt

    Pass a natural-language prompt and the API schema to the model using `model.generate()`. The output will be a correctly formatted JSON function call with arguments, ready to execute against your API.

  5. Deploy with a simple inference server

    Set up a Flask or FastAPI endpoint that accepts prompts and schemas, runs inference, and returns the function call. This operationalizes OpenFunctions for production use, handling multiple requests and scaling as needed.

Frequently Asked Questions

What is OpenFunctions and how does it work?

OpenFunctions is a free, open-source model from UC Berkeley's Gorilla LLM team that maps natural-language prompts to structured API calls. It accepts a user prompt and API schema, then outputs correctly formatted function calls with arguments, supporting parallel invocations.

How does OpenFunctions compare to OpenAI's function calling API?

OpenFunctions is a drop-in open-source alternative that eliminates per-token costs and vendor lock-in. OpenAI's solution is faster and easier but proprietary. OpenFunctions scores 59.22% on the BFCL benchmark, trailing top closed models but offering self-hosting for privacy.

What is parallel function calling in OpenFunctions?

Parallel function calling allows OpenFunctions to output multiple distinct function invocations in a single response. This is critical for complex agentic tasks like querying multiple data sources simultaneously, though its reliability may be lower than OpenAI's optimized tools endpoint.

What is the BFCL score of OpenFunctions and how does it rank?

OpenFunctions scores 59.22% on the Berkeley Function Calling Leaderboard, placing it 7th overall alongside GPT-5 as of 2025. This indicates it is competitive but less accurate than top proprietary models on nuanced or multi-step function calls.

Can I self-host OpenFunctions and is it free?

Yes, OpenFunctions is free and open-weight with no per-token costs or licensing fees. You can self-host it using the model weights on Hugging Face, but you must handle infrastructure, scaling, and updates yourself without managed SLA guarantees.

What are the main weaknesses of OpenFunctions for developers?

OpenFunctions has a 59.22% BFCL score, meaning more errors on complex calls. It lacks managed hosting, automatic updates, and SLA guarantees. Its parallel calling reliability is lower than OpenAI's, and the ecosystem of community integrations is smaller than LangChain's.

Alternatives

How OpenFunctions compares

Direct head-to-head against 3 competitors. Picked by 7wData.

This tool

OpenFunctions

Pricing
Free and open-source; no per-token costs or licensing fees. Self-hosting requires compute resources (e.g., GPU inference).
Target
Gorilla OpenFunctions is a drop-in open-source alternative to proprietary function-calling APIs, designed for developers who need to reliably map natural-language prompts to structured API calls
Strength
OpenFunctions is free and open-weight, eliminating per-token costs and enabling self-hosting for privacy-sensitive applications.
Watch for
With a 59.22% BFCL score, OpenFunctions is less accurate than top closed models like GPT-5 on nuanced or multi-step function calls.

OpenAI GPT-4o

Pricing
$2.50/$10 per 1M tokens (input/output)
Target
Developers needing reliable, hosted function calling with broad ecosystem support
Deployment
Cloud API only
Strength
Native function calling with structured output and 128K context window
Watch for
Pricing escalation on high-volume usage; vendor lock-in via proprietary format

Anthropic Claude 3.5 Sonnet

Pricing
$3.00/$15.00 per 1M tokens (input/output)
Target
Teams prioritizing safety, long-context tasks, and agentic workflows
Deployment
Cloud API only
Strength
Extended thinking for complex multi-step function chains
Watch for
Higher output cost; limited third-party inference options

DeepSeek V3

Pricing
$0.28/$0.42 per 1M tokens (input/output, cache miss)
Target
Cost-sensitive developers who can self-host or use third-party inference
Deployment
Cloud API or self-hosted
Strength
Open-weight model with near-frontier intelligence at 10-100x lower cost
Watch for
Cache-hit pricing may not apply to all workloads; less mature function-calling tooling

User reviews

No user reviews yet. Be the first to write one.

Sources

Reporting on this tool draws on these publicly available sources.

  1. huggingface.co
  2. www.reddit.com
  3. www.klavis.ai
  4. www.linkedin.com
  5. gorilla.cs.berkeley.edu
  6. community.openai.com
  7. gorilla.cs.berkeley.edu
  8. www.reddit.com
  9. www.reddit.com
  10. github.com