feat(nl2sql): add GLM, Doubao, and Sakana Fugu providers (19 → 22)#252
Merged
Conversation
Three more built-in OpenAI-compatible NL->SQL providers, each a one-line _PROVIDERS registry entry (all derived lookup tables update automatically): - glm -> https://api.z.ai/api/paas/v4 ZAI_API_KEY (fallback ZHIPUAI_API_KEY) glm-4.5-flash - doubao -> https://ark.cn-beijing.volces.com/api/v3 ARK_API_KEY doubao-seed-1-6-251015 - sakana -> https://api.sakana.ai/v1 SAKANA_API_KEY fugu Base URLs, key env vars, and default models verified against each vendor's official docs. Extended the key-discovery test with the new deviating env vars (ZAI_API_KEY, ARK_API_KEY). Bumped the built-in count to 22 in README/tools.md/tour.md and added the three rows to the user-guide provider table. release-notes-0.6.9 left at 19 (historical). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0122yLZLJ8t4W43sdN6BmTZc
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="tests/unit/test_config.py" line_range="420-422" />
<code_context>
("GITHUB_TOKEN", "github"), # deviates
("DEEPINFRA_TOKEN", "deepinfra"), # deviates
("SAMBANOVA_API_KEY", "sambanova"),
+ ("ZAI_API_KEY", "glm"), # deviates
+ ("ARK_API_KEY", "doubao"), # deviates
+ ("SAKANA_API_KEY", "sakana"),
],
)
</code_context>
<issue_to_address>
**suggestion (testing):** Add a test case for the legacy `ZHIPUAI_API_KEY` fallback env var for GLM
The GLM provider spec accepts both `ZAI_API_KEY` and the legacy `ZHIPUAI_API_KEY`. This parametrized test only covers `ZAI_API_KEY`. Please extend the parametrization to also include `("ZHIPUAI_API_KEY", "glm")` so the legacy env var behavior is covered and guarded against regressions.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Contributor
|
Warning Gemini encountered an error creating the review. You can try again by commenting |
Addresses Sourcery review on #252 — the GLM spec accepts both ZAI_API_KEY and the legacy ZHIPUAI_API_KEY; parametrize the key-discovery test for the fallback too. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0122yLZLJ8t4W43sdN6BmTZc
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
Widens the built-in
translate_nl_to_sqlfleet from 19 to 22 OpenAI-compatible providers — a low-risk adoption win. Each is a one-line entry in thenl2sql._PROVIDERSregistry (every derived lookup table updates automatically):https://api.z.ai/api/paas/v4ZAI_API_KEY(→ZHIPUAI_API_KEY)glm-4.5-flashhttps://ark.cn-beijing.volces.com/api/v3ARK_API_KEYdoubao-seed-1-6-251015https://api.sakana.ai/v1SAKANA_API_KEYfuguBase URLs, key env vars, and default models were each verified against the vendor's own docs. Adoption caveat: Doubao requires the model to be activated in the Ark console before the id resolves (documented in the user-guide row).
Docs bumped 19→22 (README,
tools.md,tour.md); three rows added to theuser-guide.mdprovider table;release-notes-0.6.9.mdleft at 19 (that release genuinely shipped 19). Key-discovery test extended with the new deviating env vars (ZAI_API_KEY,ARK_API_KEY).Roadmap linkage
Advances roadmap row: N/A — extends the existing NL→SQL provider registry (feature already shipped; this is a data-only expansion).
Checklist
ruff,ruff format, andmypy src/mcpgpassCHANGELOG.mdupdated under[Unreleased]N/A)src/mcpg/_vendor/🤖 Generated with Claude Code
Generated by Claude Code
Summary by Sourcery
Expand the built-in NL→SQL provider registry with three additional OpenAI-compatible vendors and update docs, changelog, and tests to reflect the enlarged provider fleet.
New Features:
Enhancements: