Zoo Code API Setup

Use Zoo Code OpenAI Compatible settings to add TokenHub, then test a safe coding task with native tools.

What is Zoo Code?

Zoo Code is an AI coding suite for VS Code with configurable providers, models, modes, and agent tools.

This Zoo Code setup uses its OpenAI Compatible provider controls. A model must return native OpenAI-style tool calls for Zoo Code agent work; ordinary text chat is not sufficient. Zoo Code agent workflows require models to return structured OpenAI-style tool calls, not tool instructions written as ordinary assistant text. Configure the API root and exact model ID, keep approval controls conservative, and validate read-only analysis before testing file edits or terminal execution.

Zoo Code's official first-provider tutorial covers the Welcome Screen flow: open Zoo Code from the VS Code Activity Bar, choose a provider, enter a key, select a model, and finish initialization. TokenHub is not an official preset, so this guide uses the current OpenAI Compatible fields without claiming a first-party TokenHub integration.

Start from the Welcome Screen on first launch

  1. Click the Zoo Code icon in the VS Code Activity Bar.
  2. Choose an LLM Provider on the Welcome Screen.
  3. Select OpenAI Compatible, not an option that requires an official OpenAI account.
  4. Fill the fields below with TokenHub values and finish initialization.

Start from the gear after initial setup

  1. Open the Zoo Code sidebar.
  2. Click the gear to open Settings.
  3. Choose OpenAI Compatible from API Provider.
  4. Enter:
    • Base URL: https://us-api.tokenhub.com/v1
    • API Key: your TokenHub API key
    • Model ID: the complete ID from the TokenHub model catalog
    • Context Window Size: set this only after confirming the model specification
  5. Save, then confirm that the task footer actually uses this provider profile.

Zoo Code's current OpenAI Compatible provider calls Chat Completions. Base URL should stop at /v1; do not enter a complete /chat/completions path.

Verify the Zoo Code agent behavior

  1. Create a task and ask, “Explain the current file without modifying it.”
  2. Confirm /v1/chat/completions and the profile's model ID in TokenHub logs.
  3. Request one small file edit to verify that the model returns a structured tool call.

Zoo Code's model-selection guidance emphasizes instruction following, format adherence, and context retention across tool steps. If a model answers normal questions but cannot edit a file, switch to a stronger tool-calling model instead of repeatedly changing Base URL.

Troubleshoot the actual Provider fields

  • 404: confirm Base URL ends at /v1 and does not already include /chat/completions.
  • 401: paste the API key again and make sure the current task selected the TokenHub profile.
  • Model error: Model ID must be the complete ID accepted by TokenHub.
  • Chat works but tools do not: the model may not suit Zoo Code's agent harness.
  • Saved changes use an old provider: create a new task and recheck the provider/model shown in its footer.

Official references

Choose a compatible Zoo Code model

WorkloadModel choiceWhy it fits
Complex coding tasksA tool-capable reasoning modelUse a model with reliable tool use, streaming, and the context length your workflow needs.
Daily implementationA balanced coding modelPrioritize reliable edits and useful latency for normal coding loops.
Background and subagent workA fast, lower-cost modelUse this for iterations, summaries, and simpler work only after validating tool use.
Browse TokenHub models and compatibility

Zoo Code API provider FAQ

Which provider should I select in Zoo Code?

Select OpenAI Compatible, then enter the TokenHub Base URL, API key, and exact model ID.

What if the model can chat but cannot edit files?

Use a model that supports native OpenAI-compatible tool calling and verify the provider returns structured tool calls.

Should the Base URL include /chat/completions?

No. Enter the TokenHub API root ending in /v1 unless Zoo Code’s current UI explicitly requests a different value.

How do I test Zoo Code safely?

Start in a test repository with read-only explanation, confirm the request log, and only then approve file writes or terminal commands.

Why do Zoo Code setting labels differ from this guide?

Extension versions can rename controls. Look for the OpenAI-compatible provider, Base URL, API key, and Model ID fields in the current official UI.

References

This setup is based on TokenHub and official documentation, last verified on 2026-09-08.