Skip to main content

Zoo Code

Zoo Code (formerly Roo Code) is a VS Code extension. It connects to MAG through its LiteLLM provider, because MAG is a LiteLLM gateway.

warning

Coding agents make many model calls with long contexts. Usage can be expensive and counts against the allocation of your project. Frontier models cost more per token. To reduce cost, use a smaller model for routine tasks and set a lower context limit. Check your spend on the MAG Dashboard.

1. Install Zoo Code​

Install the extension Zoo Code from the VS Code Extensions Marketplace. A Zoo Code icon appears in the activity bar.

2. Configure the provider​

Get your PAT from myAmSC. See Step 3. Zoo Code stores the key in VS Code. Do not write the PAT in a project file.

  1. Select the Zoo Code icon to open the Zoo Code panel.
  2. Select the gear icon at the top of the panel. This is not the VS Code Settings menu.
  3. Select Providers. Select + to create a profile. Enter a name, for example AmSC MAG.
  4. Set API Provider to LiteLLM.
  5. Set Base URL to https://mag.genesis.americansciencecloud.org. Do not add /v1.
  6. Set LiteLLM API Key to your PAT.
  7. Select Refresh Models.
  8. Select a model, for example claude-sonnet.
  9. Select Save.

3. Set the model limits​

Zoo Code reads the context window and output limit of each model from MAG. To change them, open Model Configuration and set these values:

SettingValue
Context WindowThe context size for the model. For Claude Haiku, use 100000. For Claude Sonnet, use 200000.
Max Output Tokens32000

Prices are higher for long contexts, so a lower context window reduces cost. See Model Recommendations.

To make Zoo Code compact the conversation earlier, set Context condensing to about 100,000 tokens (50% of a 200,000 context window). This setting is in the Context settings.

If your version of Zoo Code has a Reasoning Effort setting, use it to set the reasoning effort.

Select a provider​

To select the provider that serves the model, add a custom header in the provider settings:

HeaderValue
X-AmSC-MAG-Provideramazon or google for Claude models; openai or microsoft for GPT models

The Claude web search tool is supported on google and not supported on amazon.

See Model Selection & Options.

Migrate from Roo Code​

  1. In Roo Code, open Settings, then About Roo Code. Select Export Settings and save the file.
  2. Install Zoo Code.
  3. In Zoo Code, open Settings and import the saved file.
  4. Uninstall Roo Code.