Skip to main content

Yandex AI Studio integration

Configure and verify the CodeGraph Yandex AI Studio provider. The page explains the purpose, usage steps, and result checks.

Integrations

Use this provider when CodeGraph may send LLM and embedding inputs to the customer’s approved Yandex Cloud folder. The page describes stable CodeGraph behavior; model catalogs, quotas, prices, and required cloud roles remain volatile provider facts and must be checked before a pilot.

What CodeGraph sends

Text generation sends system_prompt, user_prompt, and generation parameters. Embedding calls send the supplied texts. Requests leave the CodeGraph boundary for the configured Yandex endpoint.

The client sets x-folder-id and x-data-logging-enabled: false. That header requests disabled provider-side data logging. The customer’s DLP, retention, access, and contractual controls govern the transfer. See LLM security.

Configure credentials

Store the API key in the approved secret manager and expose only environment references to CodeGraph:

$env:YANDEX_API_KEY = '<secret-from-approved-store>'
$env:YANDEX_FOLDER_ID = '<approved-folder-id>'
llm:
  provider: yandex
  yandex:
    api_key: ${YANDEX_API_KEY}
    folder_id: ${YANDEX_FOLDER_ID}
    model: <approved-model-name>
    base_url: https://llm.api.cloud.yandex.net/v1
    embedding_model: <approved-embedding-model>
    timeout: 60

The provider forms generation URIs as gpt://<folder_id>/<model> and embedding URIs as emb://<folder_id>/<model>. Use a folder whose IAM policy grants only the operations needed by the pilot. Never commit a resolved API key.

Select models

Compatibility aliases and defaults are implemented in src/llm/yandex_provider.py. Treat them as facts about the installed CodeGraph revision, not as the current Yandex catalog. Confirm model availability, deprecation state, context limit, quota, region, and price in the provider control plane.

Keep an approved rollback model. Change generation and embedding models independently so a failure can be attributed to one surface.

Verify the integration

python -m src.cli llm providers
python -m src.cli llm test --provider yandex --format json

The current llm test checks configuration resolution and client construction only. It does not perform inference. Follow it with a bounded non-sensitive generation and, when used, embedding workflow. Verify the model URI, folder, latency, usage accounting, provider audit evidence, and error behavior.

Failure handling

  • Authentication or folder error: check key scope and YANDEX_FOLDER_ID; rotate the key securely.
  • Unknown or unavailable model: choose a model approved in both the source revision and provider account.
  • Rate limit: reduce concurrency or request quota; do not turn retries into an uncontrolled loop.
  • Timeout or connection error: inspect network policy and request size before increasing timeout.
  • Data-policy mismatch: stop remote processing and switch to an approved provider or local path.

Rollback restores the previous provider/model configuration and repeats both construction and bounded end-to-end checks.

Source of truth

  • Provider implementation: src/llm/yandex_provider.py
  • Provider factory: src/llm/factory.py
  • CLI check: src/cli/domain_suite/llm_commands.py
  • Configuration: Configuration