Documentation
Roo Code Integration Guide
Connect the Roo Code AI development environment to A4F for access to a diverse range of models.
⚠️ Critical: Tool/Function Calling Issues in Roo Code v3.17.x
If you are experiencing issues where the AI cannot make tool calls or function calls (e.g., the model fails to read files, execute commands, or perform any actions), this is likely caused by a breaking change in Roo Code version 3.17.x.
What changed: Roo Code v3.17.x has deprecated XML-based function calls and now only implements native function calling. This is a significant change that affects:
- Models that do not support native function calling
- Models where function calling is still a beta feature
- OpenAI-compatible providers that rely on XML tool format
🔧 Recommended Solution: Downgrade to Roo Code version 3.16.x until this feature is restored. The Roo Code team is aware of this issue and may bring back XML function calling support in future updates.
Introduction
Roo Code is an advanced AI development environment designed to enhance coding workflows. By integrating it with A4F, you can power Roo Code's features with a wider selection of AI models, ensuring you always have the best tool for the job. This guide will walk you through the setup process.
Prerequisites
Before you start, make sure you have the following:
- The Roo Code extension (v3.22.6 or later) installed in your IDE.
- An active A4F account.
- Your A4F API Key, which you can get from the API Keys dashboard.
Configuration Guide
- Create a Configuration Profile
Open the Roo Code settings and navigate to the "Providers" tab. Click the `+` button next to "Configuration Profile" to create a new profile. Name it something memorable, like "A4F Web".
Image Placeholder: Creating a Roo Code Profile
A vertical screenshot showing the "Configuration Profile" section with the `+` button highlighted. - Set API Provider and Credentials
Configure the main API settings as follows:
- API Provider: Select "OpenAI Compatible".
- Base URL: Enter
https://api.a4f.co/v1. - API Key: Paste your A4F API key.
- Model: Enter the A4F model ID (e.g.,
provider-5/claude-sonnet-4). Roo Code will attempt to auto-fetch available models from the A4F endpoint.
Verify Model Access
Ensure the model you select is available in your A4F plan (Free, Basic, or Pro). If you choose a model not included in your tier, you will receive an error. Check the Models page first.Image Placeholder: API Provider Settings
A vertical screenshot showing the API Provider, Base URL, API Key, and Model fields configured for A4F. - Configure Model Parameters & Capabilities
Scroll down to configure the model's behavior. Most settings can be left at their default, but pay attention to these:
- Enable streaming: It is highly recommended to keep this checked for real-time responses. If you are an advanced user troubleshooting an issue, you can uncheck it to test non-streamed output.
- Max Output Tokens / Context Window Size: Adjust these values to match the specifications of your chosen model, as listed on our Models page.
- Image Support / Computer Use: Only check these if your selected model has `vision` capabilities. "Computer Use" is dependent on "Image Support" and works best with top-tier vision models.
- Prompt Caching: Leave this unchecked.
- Input / Output Price: These can be set for your own reference but are not required.
Image Placeholder: Model Parameters & Capabilities
A vertical screenshot showing the Context Window, Image Support, and Pricing fields. - Enable Advanced Editing
This is one of the most powerful features for coding.
Enable Editing Through Diffs (Recommended)
You should strictly enable this option. It allows the AI to apply targeted changes (diffs) to your code instead of rewriting entire files, which is much more efficient. This feature works best with powerful models that excel at agentic coding tasks. For model recommendations, consult leaderboards like the one at Aider Chat Leaderboards.Image Placeholder: Advanced Editing and Final Settings
A vertical screenshot showing the "Enable editing through diffs" checkbox and the temperature/rate limit sliders.
Final Checklist
- Leave "Enable Reasoning Effort", "Use Legacy OpenAI API format", and other advanced toggles at their default values unless you are an expert user.
- Set the "Rate limit" slider to `0s`.
- "Use custom temperature" is optional.
- Click the **Save** button at the top of the settings panel to apply your changes.
Activating Your Profile
After saving, you will be returned to the main Roo Code screen. At the bottom of the interface, select "Code" mode and choose your newly created profile (e.g., "A4F Web") from the dropdown. You are now ready to code with A4F!
Image Placeholder: Activating the A4F Profile
A vertical screenshot of the main Roo Code UI, highlighting the profile selection dropdown at the bottom.
Version Information
Troubleshooting: Downgrading Roo Code Extension
If you're experiencing tool/function calling issues with Roo Code v3.17.x or later, follow these steps to downgrade to version 3.16.x in VS Code:
Method 1: Using VS Code Extension Panel (Recommended)
- Open the Extensions Panel:
Press
Ctrl+Shift+X(Windows/Linux) orCmd+Shift+X(macOS) to open the Extensions sidebar. - Find Roo Code Extension:
Search for "Roo Code" in the extensions search bar, or scroll to find it in your installed extensions list.
- Access Extension Settings:
Click on the Roo Code extension to open its details page. Look for a small gear icon (⚙️) or click on the "Uninstall" dropdown arrow next to the Uninstall button.
- Select "Install Another Version...":
From the dropdown menu, select "Install Another Version...". This will show a list of all available versions.
- Choose Version 3.16.x:
Scroll through the list and select the latest 3.16.x version (e.g.,
3.16.5or similar). Click to install it. - Reload VS Code:
After the installation completes, reload VS Code when prompted, or manually reload by pressing
Ctrl+Shift+P/Cmd+Shift+Pand typing "Reload Window".
Method 2: Using Command Palette
- Open Command Palette:
Press
Ctrl+Shift+P(Windows/Linux) orCmd+Shift+P(macOS). - Search for Extension Version:
Type
Extensions: Install Specific Version of Extension...and select it. - Select Roo Code:
Choose "Roo Code" from the list of installed extensions.
- Pick Version 3.16.x:
Select the desired 3.16.x version from the available versions list.
Disable Auto-Updates
- Right-click on the Roo Code extension in the Extensions sidebar.
- Select "Disable Auto Update for this Extension" (if available).
- Alternatively, go to VS Code Settings and search for
extensions.autoUpdateto manage auto-update behavior globally.
Future Updates
Was this page helpful?