feat(provider): add Modal as a built-in provider for GLM-5#2871
Open
chindris-mihai-alexandru wants to merge 1 commit intoantinomyhq:mainfrom
Open
feat(provider): add Modal as a built-in provider for GLM-5#2871chindris-mihai-alexandru wants to merge 1 commit intoantinomyhq:mainfrom
chindris-mihai-alexandru wants to merge 1 commit intoantinomyhq:mainfrom
Conversation
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>
There was a problem hiding this comment.
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
modalprovider entry in the embedded provider catalog, with a hardcoded GLM-5 model configuration. - Extended
ProviderIdto includeMODAL, with parsing, display-name mapping, and built-in provider listing updates. - Added unit tests covering
modalparsing, 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.
Author
Local Testing Verified ✅Successfully tested the Modal provider integration locally: Modal API responds correctly with GLM-5:
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
forge provider login modalwith a Modal API tokenChanges
crates/forge_repo/src/provider/provider.jsonmodalprovider entry with OpenAI-compatible response typehttps://api.us-west-2.modal.direct/v1/chat/completionszai-org/GLM-5-FP8(hardcoded, as Modal hosts a single model)MODAL_API_KEY)crates/forge_domain/src/provider.rsProviderId::MODALconstant"modal"tobuilt_in_providers()list"Modal"display name mapping"modal"toFromStrimplementationtest_modal_from_str,test_modal_display_name,test_modal_in_built_in_providersTesting
cargo check -p forge_domainpassesHow to Use
forge provider login modal→ enter your token/modelReferences
🌸 Generated with AdaL