feat: add ZAI provider via OpenAI-compatible base_url; enable --api-type zai; update env example and docs#1
Draft
codegen-sh[bot] wants to merge 1 commit intomainfrom
Draft
Conversation
…ype zai; update env example and docs Co-authored-by: Zeeeepa <zeeeepa@gmail.com>
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Comment |
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
zaiprovider to configs/oai_config.py using OpenAIWrapper with base_url overridezaiinto DEFAULT_PROVIDER_PRIORITY (after openai)--api-type zaiin configs/mode_config.pyHow it works
ZAI_API_KEY,ZAI_MODEL, andZAI_BASE_URLDEFAULT_API_PROVIDER=zaior--api-type zaiapi_type=openaiand setOPENAI_BASE_URLto your Z proxy for zero-code-change usageValidation
--api-type zaiappears in help and flows into get_llm_configSetup notes
ZAI_API_KEY=[REDACTED]ZAI_MODEL=glm-4.5(or your proxy’s model name)ZAI_BASE_URL=https://<your-z-proxy>/v1Next steps (optional)
--api-type zaiand performs a no-op call behind a--skip-config-checktoggle.💻 View my work • 👤 Initiated by @Zeeeepa • About Codegen
⛔ Remove Codegen from PR • 🚫 Ban action checks
Summary by cubic
Adds a ZAI provider using the OpenAI-compatible path via base_url. Select it with --api-type zai or DEFAULT_API_PROVIDER=zai; env templates and docs include quick setup.