feat(providers): add Yandex Cloud AI Studio model provider - #35554
feat(providers): add Yandex Cloud AI Studio model provider#35554pamnard wants to merge 1 commit into
Conversation
Add first-class support for Yandex Model Gallery via the OpenAI-compatible
LLM API, including folder headers, gpt:// model URI normalization, and tests.
Related to gateway ${VAR} expansion: NousResearch#21275
tonydwb
left a comment
There was a problem hiding this comment.
Code Review Summary
Verdict: Approved ✅
Review Findings
This PR adds the Yandex Cloud AI Studio as a new model provider — a new OpenAI-compatible provider plugin with full registry integration.
✅ Looks Good
- Clean provider profile: Follows the standard
ProviderProfilepattern with all required fields (env_vars, auth_type, base_url, fallback_models). - Model normalization:
normalize_yandex_model()correctly producesgpt://<folder_id>/<model>URIs, withYANDEX_FOLDER_IDenv var placeholder expansion support. - Dynamic headers:
YANDEX_FOLDER_IDis read at access time via_yandex_headers(), not cached at init — correct for runtime env changes. - API extras:
build_api_kwargs_extras()returns({}, {})— explicitly documents that Yandex rejectsextra_body.thinkingfor DeepSeek V4 Flash. This prevents hard-to-debug errors. - fetch_models: Uses stdlib
urllib.request(no extra deps), proper auth header and timeout handling. - Test coverage: 86 lines of tests covering registry registration, aliases, model normalization,
build_api_kwargs_extras, and dynamic folder headers. - Integration hooks: Updated
.env.example,cli-config.yaml.example, andmodel_normalize.py. - Plugin metadata: Proper
plugin.yamlwith standard fields.
No Issues Found
Reviewed by Hermes Agent
tonydwb
left a comment
There was a problem hiding this comment.
Code Review Summary
Verdict: Approved ✅
Review
Adds first-class Yandex Cloud AI Studio model provider — well-structured plugin with proper auth, model URI normalization, and thorough test coverage.
✅ Looks Good
- Complete plugin: provider id, aliases, auth (YANDEX_API_KEY + YANDEX_FOLDER_ID), OpenAI-compatible endpoint, model URI normalization.
- API compatibility: Sends x-folder-id and x-data-logging-enabled: false headers.
- Edge case handled: Strips extra_body.thinking which Yandex rejects.
- Good test coverage: 13 tests, plus .env.example and cli-config.yaml.example updated.
- Clean diff: 105 lines plugin + 86 lines tests + documentation updates.
Reviewed by Hermes Agent (cron job)
|
Thanks for the complete Yandex profile, normalization logic, and focused tests. This is an automated hermes-sweeper review.
Please publish the provider as a standalone plugin repo and share it in Closed as not-planned per standing maintainer policy ( |
Summary
Add first-class support for Yandex Cloud AI Studio (Model Gallery LLM API). This is the inference backend (
llm.api.cloud.yandex.net), not SpeechKit TTS/STT (#27815, #23995).yandex(aliases:yandex-ai-studio,yandex-aistudio)YANDEX_API_KEY+YANDEX_FOLDER_IDhttps://llm.api.cloud.yandex.net/v1x-folder-idandx-data-logging-enabled: falseon requestsgpt://<folder_id>/<model>URIsextra_body.thinking(rejected by the API for DeepSeek V4 Flash).env.exampleand provider incli-config.yaml.exampleRelated
${VAR}expansion in some paths: [Bug]: Gateway environment variable not expanded for custom model providers path #21275, fix(gateway): expand config env templates before auth bridging and model resolution #35444Test plan
pytest tests/hermes_cli/test_yandex_provider.py -q(13 tests)pytest tests/providers/test_plugin_discovery.py -qhermes doctorwith realYANDEX_API_KEY+YANDEX_FOLDER_IDmodel.provider: yandexgpt://<folder>/...in config until then)Platform tested