Skip to content
AZ Labs
Model & Harness Guides/Intermediate

How to Add a New AI Model to a Coding Harness

A practical, repeatable process for connecting a new AI model to a coding harness without losing track of compatibility, credentials, testing, or fallback behaviour.

Published 25 July 2026•Updated 25 July 2026•9 min read
Share this articlePost on X

Key takeaways

  • Check the model contract before changing the harness: endpoint, context window, output limit, tools, vision, and reasoning support can differ.
  • Keep credentials out of configuration files that might be committed or shared.
  • A one-prompt smoke test catches more integration mistakes than a successful model-list response.
  • Record the exact model ID, route, test result, and date so the setup remains reproducible.

The workflow

Set it up, then prove it works

  1. 1

    Define the model contract

    Write down the exact provider/model ID, API compatibility, endpoint, supported modalities, context window, output limit, and whether the route supports tools or function calling. Treat the model ID as an exact identifier, not a display name.

  2. 2

    Prepare the endpoint and secret

    Confirm that the harness can reach the provider endpoint and put the key in an environment variable or local secret store. Never paste a live key into a guide, repository, screenshot, or browser-side configuration.

    MODEL_ID="provider/model-id"
    BASE_URL="https://api.example.com/v1"
    export PROVIDER_API_KEY="replace-me-locally"
  3. 3

    Add the route to the harness

    Use the harness provider configuration or model picker to add the route. The shape varies by harness, but the important fields are usually the model ID, base URL, API key reference, output limit, and any image/tool capability flags.

    {
      "model": "provider/model-id",
      "baseUrl": "https://api.example.com/v1",
      "apiKeyEnv": "PROVIDER_API_KEY"
    }
  4. 4

    Run an exact smoke test

    Test the configured route outside the interactive UI first. Use a tiny prompt with an unambiguous expected reply, then capture whether the harness responded, the HTTP result if available, and the latency.

    date
    hyperfine --runs 1 --warmup 0 --show-output \
      -n "new-model" \
      "your-harness --model '$MODEL_ID' -p 'reply OK'"
  5. 5

    Test the work the model will actually do

    A successful hello-world response only proves that authentication and routing work. Run a small representative coding task, then check tool calls, structured output, context handling, error behaviour, and whether the response can be used without manual repair.

  6. 6

    Document and share the setup

    Record the exact route, configuration fields, supported capabilities, test date, outcome, and known limitations. A durable guide should tell the next person what to copy, what to verify, and what to do when the provider changes.

Before you start

  • The provider/model identifier and the endpoint or base URL
  • An API key stored in your local secret manager or environment
  • The harness command or configuration file you want to update
  • A small, deterministic prompt for the first smoke test

Why model IDs and display names must stay separate

A provider can expose a friendly model name in a dashboard while the API expects a different identifier. Harnesses may also prepend a provider namespace or use their own alias. Copy the exact identifier accepted by the endpoint, and show the friendly name separately so readers can tell the difference.

This distinction matters when the same underlying model is available through multiple routes. The model maker, hosting provider, endpoint, pricing, and capability set should be recorded independently rather than collapsed into one label.

What to verify beyond a successful response

A route can answer a short prompt and still fail in a coding workflow. Check the context window, maximum output, streaming behaviour, tool or function calling, vision inputs, reasoning controls, rate limits, and error format before recommending it for regular use.

For production work, compare accepted output quality, latency, cost or subscription status, and fallback behaviour. The fastest route is not always the most useful route if it creates extra review work.

How to keep the guide useful after launch

Put the exact model and route in the title or introduction, include an updated date, and call out any provider-specific differences. When a model or endpoint changes, update the guide rather than silently changing a command.

Link the guide to related model notes, harness documentation, and the relevant AZ Labs integration service. That gives readers a useful next step while keeping the technical reference focused.

Frequently asked questions

Does every AI model work with every coding harness?

No. Compatibility depends on the API contract, authentication method, supported capabilities, context limits, and the harness provider adapter. An OpenAI-compatible endpoint is a useful starting point, not a guarantee of feature parity.

Should an API key be included in the guide?

Never. The guide should refer to an environment variable or secret-manager entry and show only a placeholder value.

How often should a model setup guide be updated?

Update it whenever the model ID, endpoint, authentication flow, capabilities, pricing status, or harness configuration changes. Keep the latest verified date visible on the page.

Sources and further reading