Skip to content

feat(provider): add Modal as a built-in provider for GLM-5#2871

Merged
amitksingh1490 merged 2 commits intotailcallhq:mainfrom
chindris-mihai-alexandru:feat/modal-provider
Apr 13, 2026
Merged

feat(provider): add Modal as a built-in provider for GLM-5#2871
amitksingh1490 merged 2 commits intotailcallhq:mainfrom
chindris-mihai-alexandru:feat/modal-provider

Conversation

@chindris-mihai-alexandru
Copy link
Copy Markdown
Contributor

Summary

Add Modal as a built-in provider in ForgeCode, enabling access to Z.ai's GLM-5 (745B parameter) flagship open-source model hosted on Modal's infrastructure.

Motivation

Modal recently partnered with Z.ai to offer GLM-5 via an OpenAI-compatible API endpoint. GLM-5 is a frontier open-weights MoE model designed for long-horizon agents and systems engineering, matching proprietary model performance. Modal offers free access until April 30th, 2026.

Adding Modal as a provider allows ForgeCode users to:

  • Try GLM-5 for free — No cost until end of April 2026
  • Use a frontier open model — 745B params, 192K context, MIT licensed
  • Zero config — Just forge provider login modal with a Modal API token

Changes

crates/forge_repo/src/provider/provider.json

  • Added modal provider entry with OpenAI-compatible response type
  • API endpoint: https://api.us-west-2.modal.direct/v1/chat/completions
  • Model: zai-org/GLM-5-FP8 (hardcoded, as Modal hosts a single model)
  • Auth: API key (MODAL_API_KEY)

crates/forge_domain/src/provider.rs

  • Added ProviderId::MODAL constant
  • Added "modal" to built_in_providers() list
  • Added "Modal" display name mapping
  • Added "modal" to FromStr implementation
  • Added 3 unit tests: test_modal_from_str, test_modal_display_name, test_modal_in_built_in_providers

Testing

  • cargo check -p forge_domain passes
  • ✅ All 23 provider tests pass (3 new for Modal)
  • ✅ JSON validation passes

How to Use

  1. Get a free token at modal.com/glm-5-endpoint
  2. forge provider login modal → enter your token
  3. Select GLM-5 via /model

References

🌸 Generated with AdaL

Add Modal as a new provider in ForgeCode, enabling access to Z.ai's
GLM-5 745B parameter model hosted on Modal's infrastructure. Modal
offers an OpenAI-compatible API endpoint with free GLM-5 access
until April 30th, 2026.

Changes:
- Add 'modal' entry to provider.json with GLM-5-FP8 model
- Add ProviderId::MODAL constant to forge_domain
- Wire up display_name ("Modal"), FromStr, and built_in_providers()
- Add unit tests for MODAL display name, from_str, and built_in_providers

Co-Authored-By: ForgeCode <noreply@forgecode.dev>
Copilot AI review requested due to automatic review settings April 6, 2026 19:09
@github-actions github-actions bot added the type: feature Brand new functionality, features, pages, workflows, endpoints, etc. label Apr 6, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Modal as a built-in provider so ForgeCode can use Z.ai’s GLM-5 via Modal’s OpenAI-compatible chat completions endpoint.

Changes:

  • Added a new modal provider entry in the embedded provider catalog, with a hardcoded GLM-5 model configuration.
  • Extended ProviderId to include MODAL, with parsing, display-name mapping, and built-in provider listing updates.
  • Added unit tests covering modal parsing, display name, and inclusion in built-in providers.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
crates/forge_repo/src/provider/provider.json Adds the modal provider config pointing at Modal’s OpenAI-compatible chat completions URL with a hardcoded GLM-5 model.
crates/forge_domain/src/provider.rs Registers ProviderId::MODAL and adds tests ensuring correct string parsing, display name, and built-in listing inclusion.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@chindris-mihai-alexandru
Copy link
Copy Markdown
Contributor Author

Local Testing Verified ✅

Successfully tested the Modal provider integration locally:

$ forge provider list | grep -A 4 MODAL
MODAL
  name      Modal
  id        modal
  host      api.us-west-2.modal.direct
  logged in [yes]

Modal API responds correctly with GLM-5:

  • Model: zai-org/GLM-5-FP8
  • Context: 192K tokens
  • Reasoning: Returns reasoning_content field
  • Latency: ~50s cold start, then fast responses

ForgeCode joins Claude Code, OpenCode, OpenClaw, and Vercel AI SDK as frontends with native Modal/GLM-5 support.

Co-Authored-By: ForgeCode noreply@forgecode.dev

@github-actions
Copy link
Copy Markdown

Action required: PR inactive for 5 days.
Status update or closure in 10 days.

@github-actions github-actions bot added the state: inactive No current action needed/possible; issue fixed, out of scope, or superseded. label Apr 11, 2026
@github-actions github-actions bot removed the state: inactive No current action needed/possible; issue fixed, out of scope, or superseded. label Apr 13, 2026
@github-actions github-actions bot added the update: provider Updates provider.json configuration. label Apr 13, 2026
@amitksingh1490 amitksingh1490 merged commit a529fb2 into tailcallhq:main Apr 13, 2026
8 checks passed
@tusharmath tusharmath removed the type: feature Brand new functionality, features, pages, workflows, endpoints, etc. label Apr 14, 2026
@github-actions github-actions bot added the type: feature Brand new functionality, features, pages, workflows, endpoints, etc. label Apr 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: feature Brand new functionality, features, pages, workflows, endpoints, etc. update: provider Updates provider.json configuration.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants