A windswept bonsai on a floating island

Get to know Cadenya

We’re developers who love to build. We set out to create a yes-code platform that makes building agents feel like the best parts of building software.

Using GLM Flash on Cadenya

Walkthrough

$ whoami
> Robert Ross

Cadenya supports using any model in your agent variations, including open-weight models. The mystery of using these open-weight models has faded considerably, especially with companies such as Modal offering point-and-click options to deploy them.

This (short) post goes into how you can connect GLM 5.3 Flash, hosted on Modal, to Cadenya and use it for your agent.

Creating the endpoint

Modal has made it dead simple to create a private endpoint that follows the OpenAI API’s chat completion format. First, you’ll need to be logged in to your Modal account.

  1. Go to https://modal.com/endpoints/{workspaceSlug}/main.
  2. Click “Create Endpoint.”
Creating an endpoint in Modal

Once you’re on the Create Endpoint page, you can select GLM and then the Flash version.

Note: Really, any model will work in this tutorial, but we’re focused on GLM.

Creating an endpoint in Modal

Select the GLM Flash model, give the endpoint a different name if you like (your prerogative), and click “Create Endpoint.”

Proxy tokens

Modal requires proxy tokens to access these endpoints. These token pairs can be found at https://modal.com/settings/{workspaceSlug}/proxy-auth-tokens. Save the token pair for the next step.

Add the AI provider to Cadenya

Cadenya supports adding OpenAI-compatible providers, including Modal. We can configure a new AI provider with our shiny new endpoint and proxy tokens to start using GLM in a few steps.

  1. Go to https://app.cadenya.com/w/default/aiProviders.
  2. Click “Add AI Provider” in the top right.

Fill in the form with these values:

AI provider Read-only · Copy where available

Select this option from the Provider dropdown.

Replace the placeholder with your Modal shared endpoint URL. Be sure to include /v1 at the end.

Add a header named Authorization. Replace the placeholders with the proxy token pair you saved earlier.

Here’s what mine looks like at this point:

Creating an AI Provider in Cadenya

Once you save it, you’ll be dropped into the AI provider’s details page.

Adding the model

Click the “Add Model” button in the bottom left of the AI provider’s details page, and we’ll enter our details for GLM Flash.

Creating an AI Provider in Cadenya

Modal has a dedicated page for each model in its library with all the details we need to fill in this form.

You can find the GLM 5.3 Flash details here, for example.

Model details Read-only · Copy where available

This must match exactly; otherwise, chat completions will fail.

1 million tokens.

Turn on Prompt Caching in the capabilities, too.

Pricing Read-only · Copy where available

USD per million tokens.

USD per million tokens.

Save the model, and let’s hook it up to an agent variation in Cadenya.

Wiring it up to an agent

Now you’ll need to create an agent and a variation in Cadenya to use this model. If you already have both, you can skip this part.

Go to the New Agents page in Cadenya and create a new agent.

The agent

We can create a straightforward agent called “GLM Test” in Cadenya (no structured outputs or episodic memory required).

GLM Test Read-only · Copy where available

Click “Create Agent.”

The variation

You’ll be redirected to add the first variation to the newly created GLM Test agent. We can use these sample values to configure it:

Default Read-only · Copy where available

Find the model we added above and select it.

Watch it fly

Once you have an agent configured, we can dispatch an objective to it. Click the kebab menu in the top right, then click “Run.” Once the dialog appears, you can write a fake customer support message:

Hello, my order has not arrived, and I need help. It's a shoe order, and I badly need my kicks for a wedding, or my family might disavow me. I can't be having that.

GLM with tool calls

Cadenya is built for calling tools, and GLM Flash is very accurate at tool calling for how fast it is.

Now, let’s add a tool set to our workspace to use the free-faker-mcp project. This is an MCP server hosted at https://free.cadenya.com/faker-mcp that provides tools you can easily try in your agents.

Adding the tool set

Visit the Create Tool Set page in your workspace. From there, we’ll add our Faker tool set.

Faker Tool Set Read-only · Copy where available

The MCP settings in your tool set should look like this:

MCP Settings

Save the tool set, and you’re ready to use it in your agent!

Adding it to your variation

Head back to the Agents → GLM page and assign your tool set to your variation. Once you’re on the agent page, find the “Add Assignment” button and search for the Faker Tools tool set you just created.

Watching GLM use the tools

Follow the steps from earlier to give the agent a new objective with a prompt like this:

Hello, I need a fake name generated for me.

The new objective will be dispatched to the agent, and we’ll see it call the Faker Tools tool set to generate a fake name.

GLM using the Faker Tools tool set

Wrapping up

Using open-weight models is not scary with tools like Modal on the market. Cadenya is a great way to quickly try these fast, cheap models with low risk, too.

Sign up for Cadenya

Grow wherever AI goes next.

Start shipping agents that are equipped to evolve.

A pine bonsai overlooking a mountain lake