When your AI pair programmer picks the stack for you

APIKeyClaudeFree · Updated 2026-11-22 · 9 min read

Developer workspace with two monitors
Plans from coding assistants deserve the same review as any design proposal.

Many developers who use AI coding tools daily have noticed a pattern: ask for an implementation plan, and the plan quietly includes a call to the assistant maker's own model API, even when the feature did not need a language model at all. A summary field becomes an LLM call, a simple sort becomes "ask the model to rank", and suddenly the project has a metered dependency nobody asked for.

This article looks at why assistants drift toward familiar APIs, how to tell a reasonable suggestion from a reflex, and how to write instructions and project rules so the tool proposes the simplest design first. It applies to any assistant, whichever company built it.

Frequently asked questions

Is a coding assistant deliberately advertising its maker's API?

There is no public evidence of deliberate advertising, and you should not assume it. The simpler explanation is training data and documentation: an assistant has seen its own vendor's SDK examples many times, so that code is the most familiar completion for "add AI here".

What is vendor lock-in in an AI feature?

Lock-in means your code depends on one provider's request format, model names or special features so deeply that switching would require a rewrite. It is a cost you accept knowingly or a risk you accept by accident.

How does an LLM call differ from ordinary code in cost?

Ordinary code is effectively free to run once written. An LLM call is metered per token, adds latency of seconds, can fail with rate limits and returns slightly different output each time. That makes it a heavier dependency than it first looks.

When is adding a model API the right call?

When the task genuinely needs language understanding: free-form summarisation, classification of messy text, drafting replies. If a regular expression, a database query or a sort can do it, those are cheaper and deterministic.

Which is better for portability, the OpenAI format or a vendor's native format?

The OpenAI-style chat format is supported by many providers and open models, so it is usually easier to switch. Native formats sometimes expose features earlier. A thin wrapper in your own code gives you both.

Can project rules stop the assistant from adding APIs?

They reduce it a lot. Most coding tools read a project instruction file. A clear rule such as "do not add external AI APIs without asking" is followed most of the time, though you should still review plans.

Is the free-ai endpoint a substitute for the Anthropic API?

It is a different model, not Claude, and it has no SLA. It is useful for prototyping an AI feature without a key. For production quality, a paid provider is often the better choice.

What developers are seeing

The complaint usually goes like this: a developer asks the assistant to plan a feature, for example importing a CSV and showing a dashboard. The plan comes back with a step called "use the model API to categorise rows" or "generate insights with an LLM". The data was already categorised. The insights were three numbers that SQL could compute.

On its own, one such suggestion is harmless. Over weeks, it adds up to an app where several core paths depend on a remote, metered service. Each one needs a key, error handling, retries and a budget, and each one makes local testing harder.

It often appears in planning, not in code

The drift is most visible in high-level plans, where the assistant decides architecture. Once a plan says "call the model here", the implementation faithfully follows, and the decision is easy to miss in review.

It is not unique to one tool

Developers report similar habits across different assistants, each leaning toward the APIs and libraries it knows best. The behaviour reflects familiarity more than any one company's policy.

Why assistants lean toward familiar APIs

Language models complete patterns. If the most common examples of "add an AI feature" in their training data and documentation use a particular SDK, that SDK becomes the default answer. Assistants built by a model company are also tuned with examples that showcase that company's tools, which strengthens the habit.

There is a second, subtler reason: assistants are eager to be helpful. When asked to "make this smarter", adding a model call is a visible, impressive change. A plain lookup table is less exciting, even when it is the better engineering choice.

Recency effects in instructions

If your conversation recently mentioned AI, models or prompts, the assistant is primed to reach for an LLM in the next design too. Context shapes suggestions more than most people expect.

Missing constraints

Without explicit rules about dependencies, cost or offline operation, the assistant has no reason to avoid an API. It optimises for the request as written, and the request rarely says "keep it cheap".

Toolbox with a power tool above simple hand tools
The impressive tool is not always the right one for the job.

Telling a good suggestion from a reflex

Before accepting a plan step that calls a model, ask three questions. Does the task need judgement over unstructured language? Would a wrong answer be acceptable occasionally? Is the extra latency fine for this path? If any answer is no, the step probably should be ordinary code.

A useful exercise is to ask the assistant itself: "Propose a version of this step without any LLM call, and list the trade-offs." Assistants are good at this when asked directly, and the comparison often makes the simpler path obvious.

Pay attention to how the assistant justifies a model call. Phrases like "for flexibility" or "to handle edge cases" are often a sign that nobody has defined the edge cases yet. A concrete justification names the input that rules cannot handle, for example customer messages written in several languages with slang and typos.

Try the boring version first

Build the deterministic version, run it on real data and count how many cases it gets wrong. If the error rate is acceptable, you are done. If not, you now have a precise list of hard cases that a model can be tested against, which is a far better starting point than a vague plan step.

Watch for model calls inside loops

A suggestion to call the model once per row, per file or per user is where costs and rate limits bite hardest. Ask whether the work can be batched, cached or moved to a single summary call at the end.

  • Sorting, filtering, totals and dates: ordinary code.
  • Matching against a fixed list of categories: rules or a lookup table first.
  • Summarising free-text feedback: a model is reasonable.
  • Drafting replies a human will edit: a model is reasonable.
  • Anything security-sensitive or legally binding: deterministic code plus human review.

Writing project rules that keep plans lean

Most coding tools load a project-level instruction file on every session. That file is the right place for dependency policy. Keep the rules short, concrete and phrased as defaults, so the assistant knows when it may break them.

Be explicit about which provider, if any, is approved and through which wrapper module. That way, even when a model call is justified, it goes through one place you control.

Ask for a marked plan

Requiring the assistant to tag model-dependent steps turns a hidden decision into a visible one. Reviewing a plan then takes seconds: scan for the tags and challenge each one.

## Dependencies and AI calls
- Do not add calls to any external AI or LLM API without asking first.
- Prefer plain code, SQL or a lookup table when the task is deterministic.
- If an LLM call is approved, use src/llm_client.py only. Never import a vendor SDK elsewhere.
- Every LLM call must have a timeout, a retry on 429/503 and a fallback path.
- In plans, mark each step that needs a model with [LLM] and explain why.
Universal adapter connecting several cables
One thin wrapper lets you switch providers through configuration.

Keep model calls behind one thin wrapper

When a model call is justified, isolate it. A small module that accepts a prompt and returns text lets you switch providers by changing configuration rather than hunting through the codebase. The OpenAI-compatible chat format is a practical common denominator, since many providers and open models accept it.

This wrapper also gives you one place for timeouts, logging and cost tracking, which coding assistants tend to skip unless asked.

Configuration, not code, picks the vendor

With the base URL, model and key in environment variables, you can prototype on a free endpoint and move to a paid provider later without touching business logic.

Native features are a conscious exception

If you need a feature only one vendor offers, call it from a separate, clearly named function. That keeps the lock-in visible and contained.

import os
from openai import OpenAI

BASE_URL = os.environ.get("LLM_BASE_URL", "https://api.apikeyclaudefree.com/v1")
MODEL = os.environ.get("LLM_MODEL", "free-ai")
API_KEY = os.environ.get("LLM_API_KEY", "not-needed")

_client = OpenAI(base_url=BASE_URL, api_key=API_KEY, timeout=60, max_retries=2)


def complete(prompt: str, system: str = "You are a concise assistant.") -> str:
    resp = _client.chat.completions.create(
        model=MODEL,
        messages=[
            {"role": "system", "content": system},
            {"role": "user", "content": prompt},
        ],
    )
    return resp.choices[0].message.content

The real costs of an unneeded model call

Cost is the obvious one, but it is often not the largest. A model call adds seconds of latency to a request that could take milliseconds. It introduces non-determinism, so tests become flaky. It adds a failure mode: when the provider is overloaded, your import or dashboard breaks too.

There is also a key-management cost. Every new integration needs a secret stored safely, rotated and kept out of logs. Teams under pressure sometimes cut corners here, and that is how keys end up pasted in public repositories, where strangers find and abuse them.

Testing gets harder

Unit tests for a model-backed function need mocks or recorded responses. Plain code can be tested with simple assertions, which is one more reason to keep the model out of paths that do not need it.

Budgets creep

A call that costs almost nothing in development may run thousands of times per day in production. Estimate volume before you accept the plan, not after the first invoice.

Stopwatch and coins beside a laptop
Latency and per-token cost add up across every unneeded call.

Prototyping AI features without committing to a vendor

Sometimes you do want to test whether an AI step adds value before deciding on a provider. A keyless endpoint is handy for this. The free-ai model on this site's API is an independent open-weight model of roughly 35B parameters; it is not Claude, and this site is not affiliated with Anthropic. You can point the wrapper above at it, try the feature, and measure whether users care.

If they do, and the feature needs top-tier reasoning or reliability, move to a paid key from the provider of your choice through its official console. Never shortcut this with keys shared in forums or sold cheaply by resellers; those are usually someone else's money, and they stop working without warning. For how such keys circulate, the article on unofficial proxies goes into detail.

Know the free tier's limits

The endpoint allows one request per second per IP, two in parallel, and a daily token budget. That is plenty for a prototype and not meant for a production backend.

A quick review checklist for AI-generated plans

Make this part of your routine whenever an assistant proposes architecture. It takes a minute and prevents the slow accumulation of dependencies that nobody chose on purpose. Tools such as coding-tuned models are excellent at producing plans quickly, which is exactly why the human review step matters.

None of this means AI features are bad. It means they should be chosen, not inherited from a template. A project with two well-placed model calls, each behind a wrapper with a fallback, is easier to run than one with ten scattered calls added because the assistant found them natural.

  • Which steps call an external model, and why?
  • Could any of them be a query, a rule or a library function?
  • Is every model call behind the shared wrapper?
  • Are timeouts, retries and fallbacks defined?
  • What is the expected daily volume and cost?
  • Where is the API key stored, and who can read it?
Clipboard with a checklist on a workbench
A one-minute checklist keeps dependencies deliberate.
Try the free API

Send a test prompt to the keyless free-ai endpoint from the chat box on the home page, no sign-up or key required.

Read also