Yandex Cloud
Search
Contact UsGet started
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML Services
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
© 2025 Direct Cursus Technology L.L.C.
Yandex AI Studio
  • Compatibility with OpenAI
    • All tutorials
    • Implementing an AI assistant with search capabilities for PDF files with complex formatting
    • Model tuning in DataSphere
    • Creating an AI agent with Yandex Cloud Functions
    • Integrating the Qwen3 model into Visual Studio Code
    • Creating an AI assistant for Telegram
    • Developing a Telegram bot with AI agent support using Yandex Workflows
    • AI-powered review of GitHub pull requests with Yandex Workflows and GitHub Actions
  • Access management
  • Pricing policy
  • Audit Trails events
  • Public materials
  • Release notes

In this article:

  • Set up the infrastructure
  • Create a folder
  • Create a service account
  • Create an API key for the service account
  • Connect to the model
  • Test the model
  1. Tutorials
  2. Integrating the Qwen3 model into Visual Studio Code

Integrating the Qwen3 model into Visual Studio Code

Written by
Yandex Cloud
Updated at October 24, 2025
  • Set up the infrastructure
    • Create a folder
    • Create a service account
  • Create an API key for the service account
  • Connect to the model
  • Test the model

You can facilitate software development in Visual Studio Code with Qwen3-235B-A22B. The model can generate code, convert it to other programming languages, help you with debugging and error detection in code, analyze data, write documentation, and more.

In this tutorial, you will integrate the Qwen3-235B-A22B model into your Visual Studio Code IDE with the help of Yandex AI Studio and the Roo Code extension.

To use Qwen3-235B-A22B as your Visual Studio Code assistant, proceed as followings:

  1. Set up your infrastructure.
  2. Create an API key for the service account.
  3. Connect to the model.
  4. Test the model.

The infrastructure support fee for connecting Qwen3-235B-A22B from Visual Studio Code includes a text generation fee (see Yandex AI Studio pricing).

Set up the infrastructureSet up the infrastructure

Create a folderCreate a folder

Management console
  1. In the management console, select a cloud and click Create folder.
  2. Name your folder, e.g., aistudio.
  3. Click Create.

Create a service accountCreate a service account

You will need this service account to get an API key.

Management console
  1. Navigate to aistudio.
  2. In the list of services, select Identity and Access Management.
  3. Click Create service account.
  4. Enter a name for the service account, e.g., qwen-user.
  5. Click Add role and assign the ai.languageModels.user role to this service account.
  6. Click Create.

Create an API key for the service accountCreate an API key for the service account

You need to create an API key for Visual Studio Code to be able to access the model.

Management console
  1. In the management console, navigate to aistudio.
  2. In the list of services, select Identity and Access Management.
  3. In the left-hand panel, select Service accounts.
  4. In the list that opens, select qwen-user.
  5. In the top panel, click Create new key and select Create API key.
  6. In the Scope field, select yc.ai.languageModels.execute.
  7. Click Create.
  8. Save the ID and secret key.

Connect to the modelConnect to the model

  1. Install the Roo Code extension in Visual Studio Code.
  2. Click Roo Code in VSC left-hand panel.
  3. In the window that opens, select OpenAI Compatible in the API Provider field.
  4. In the Base URL field, specify https://llm.api.cloud.yandex.net/v1.
  5. In the API-key field, paste the secret key value you got in the previous step.
  6. In the Model field, specify gpt://<folder_ID>/qwen3-235b-a22b-fp8/latest, where <folder_ID> stands for the aistudio folder ID.
  7. Click Go!.

Test the modelTest the model

As an example, let's ask Qwen to generate a script to access an AI model via the OpenAI SDK.

  1. Click Roo Code in Visual Studio Code left-hand panel.

  2. In the window that opens, enter your prompt in the input field below and click Send message:

    Write a script named `test.py` to make a streaming call to generate a poem about Yandex Cloud via the Python OpenAI SDK. Use model token and ID as parameters. Use `https://llm.api.cloud.yandex.net/v1` as the endpoint
    

    Result:

    import sys
    from openai import OpenAI
    
    def main():
        if len(sys.argv) != 4:
            print("Usage: python test.py <token> <model_id> <folder_id>")
            return
    
        token = sys.argv[1]
        model_id = sys.argv[2]
        folder_id = sys.argv[3]
    
        client = OpenAI(
            base_url="https://llm.api.cloud.yandex.net/v1",
            api_key=token,
            project=folder_id
        )
    
        stream = client.chat.completions.create(
            model=model_id,
            messages=[
                {"role": "user", "content": "Write a poem about Yandex Cloud"}
            ],
            stream=True
        )
    
        for chunk in stream:
            content = chunk.choices[0].delta.content
            if content:
                print(content, end="")
    
    if __name__ == "__main__":
        main()
    

Was the article helpful?

Previous
Creating an AI agent with Yandex Cloud Functions
Next
Creating an AI assistant for Telegram
© 2025 Direct Cursus Technology L.L.C.