Feature × Audience

How does function calling work for enterprise architects on Plugsky?

For architects, tools are interfaces: registry, versioning, gateway policy and per-tool identity keep the execution surface governed. On Plugsky, function calling is a loop around /v1/chat/completions: you send a tools array, the model returns tool_calls with JSON arguments, your code executes them inside your boundary, and streaming and JSON mode are supported.

Key facts

Looptools array on /v1/chat/completions; model returns tool_calls with JSON arguments
ExecutionYour code executes tools; the model never holds credentials
StreamingFunction calling works with streaming on live chat models
JSON modePair strict tool schemas with JSON mode for structured output
Model supportTool support varies by model; verify per model in the catalogue
StatusFunction calling is live; assistants and responses endpoints are coming soon
RegistryVersion tool schemas centrally and treat them as interfaces
BoundaryTools execute inside your network; the model holds no credentials

TL;DR

  • A tools array on /v1/chat/completions; your code executes every tool call.
  • Streaming and JSON mode work alongside function calling on live chat models.
  • A tool registry with owners and versions prevents an unmanaged execution surface.
  • Authorization stays in your gateway; the model only proposes calls.
  • Start free with plugsky-micro and plugsky-lite; a 14-day full-access trial covers larger models.

How it works, step by step

  1. Write strict JSON schemas for each tool with typed fields and enums.
  2. Implement the loop and validate every argument before execution.
  3. Log model, tool name, arguments and result for each call.
  4. Create a tool registry with schema versions, owners and review gates.
  5. Route execution through a gateway with per-tool identity and policy.
  6. Define deprecation and rollback paths for tool changes.
1Write strict JSONschemas for eachtool with typed2Implement the loopand validate everyargument before3Log model, toolname, arguments andresult for each4Create a toolregistry withschema versions,5Route executionthrough a gatewaywith per-tool6Define deprecationand rollback pathsfor tool changes.

Try it yourself

Open the tool registry builder →

Function calling for enterprise architects: what changes

Enterprise architects treat function calling as an integration pattern: a contract between model output and real systems. Done well, tools look like versioned interfaces with owners, policies and audit; done badly, they become an unmanaged execution surface.

Function calling on Plugsky is a loop around /v1/chat/completions: you send a tools array of JSON schemas, the model returns tool_calls with arguments, your code executes them inside your own boundary, appends the results and calls again until the model produces a final answer. Streaming works with tools, and JSON mode pairs with strict schemas for structured output. Tool support varies by model, so verify it per model in the catalogue.

Architecture and controls

Maintain a tool registry with schema versions and owners, route execution through a gateway that enforces policy, and give each tool its own identity and least-privilege scope. Keep execution inside your network boundary.

Integration pattern and rollout

Standardise the loop across teams: shared schema conventions, argument validation, idempotency keys and trace logging. Review tools like any API change, including deprecation and rollback paths.

Treat tool schemas as code-execution boundaries. Validate every argument against the schema before it reaches a system, scope each tool to least privilege, make write operations idempotent, and fail closed on invalid output. The model never holds credentials; your executor does. Log model, tool name, arguments and result for every call so reviewers can reconstruct decisions.

Limits, evidence and cost

The model is not a policy engine: authorization stays with your gateway and services. Plan for tool version drift and model differences, and be explicit that function calling is live while assistants-style endpoints remain roadmap items.

Function calling is available on live chat models across plans — see the live pricing page for current tiers. Start free with plugsky-micro and plugsky-lite and no card, then use the 14-day full-access trial to evaluate larger models against your tool scenarios.

Honest comparison

ConcernPlugsky function callingVendor-locked tool platformsBuilding in-house
InterfaceOpenAI-style tools array on chat completionsProprietary assistants APICustom schema and runtime
ExecutionYour code runs tools inside your boundaryVaries; often vendor-hosted toolsYou build the executor
Model choice30+ models; tool support varies by modelVendor catalogue onlyYou host each model
ResidencyRegion-locked planes; VPC, on-prem and air-gappedLimited region choicesWherever you deploy
StatusLive on chat completionsVaries by vendorMonths of engineering
Tool governanceRegistry, gateway and least-privilege identityVendor portalYou run every control

Frequently asked questions

How does the function calling loop work?

You send a tools array with the request, the model returns tool_calls with JSON arguments, your code executes them, appends results and calls again until the model answers.

Does the model execute tools itself?

No. Execution happens in your code, inside your boundary. The model never receives credentials, and your executor enforces permissions and validation.

Which models support function calling?

Function calling is live on chat models, but tool support varies by model. Verify per model in the catalogue and test your schemas before production.

How do we govern tools across teams?

Keep a registry with schema versions and owners, route execution through a gateway, and review tools like any API change.

Who holds credentials for tools?

Your executor does. Give each tool its own identity with least-privilege scope, and never pass credentials to the model.

What about model differences?

Tool support varies by model. Standardise on models that pass your schema tests, and keep the loop model-agnostic where possible.