One agent, any model: how to stay free to choose
Claude, GPT, Gemini and the open models overtake each other several times a year. An agent built around one of them has to be rebuilt each time. How to keep the model a part you can change, and how to decide which one a job needs.
By DevOps.ae. Published 28 November 2026. 5 minute read.

Whichever language model is best for your work today will probably not be best a year from now. The leading models from Anthropic, OpenAI and Google pass each other several times a year, and open models that you can run yourself follow not far behind. Prices fall. Models are retired on a published date whether you are ready or not.
So the useful question is not "which model should we build on?". It is "how do we build so that the answer can change?".
What ties an agent to one model
The ties are rarely deliberate. They build up.
- Prompts tuned by trial and error. Instructions rewritten until one model behaved, full of phrasing that only that model needs.
- A provider's own way of calling tools. Each has its own format for describing tools and returning calls to them.
- Features only one provider has. Useful, and each one is a hook.
- Assumptions about size and speed. Code that takes for granted how much text fits in one request, or how long an answer takes.
- No way of telling better from worse. This is the strongest tie of all. If you cannot measure whether a different model does the job as well, you will never dare to change.
Keep four things outside the model
An agent is more than its model. The parts that hold its value can all be kept where a change of model does not touch them.
The tools. Define what the agent can do (read this repository, run this plan, post this comment) once, behind one interface. Open standards such as the Model Context Protocol exist for this, and the main model providers have adopted them. The model changes. The tools do not.
The limits. What the agent may touch is enforced by its identity and its permissions, in your cloud account and your version control. It is never enforced by asking the model nicely. Limits kept there do not care which model is on the other end.
The test cases. A set of real jobs with known right answers: changes that were dangerous, changes that were safe, last quarter's incidents. This is the asset that makes everything else possible, and it belongs to you, not to a provider.
The record. What the agent did and why, kept in your own systems in a form that does not depend on any provider's console.
With those four outside, the model is one part among several. The picture at the top shows it: one agent, one socket, and more than one part that fits.
Choose for the job, not for the company
There is no need for a single answer across a whole organisation. Different work wants different things from a model, and a team of agents can use several.
| The job | What matters most | What usually fits |
|---|---|---|
| Reviewing an infrastructure change | Careful reasoning over a long plan | The strongest hosted model you are allowed to use |
| Sorting and labelling alerts | Speed and cost, thousands of times a day | A small, fast model |
| Answering developers from your own runbooks | Staying inside the documents | A mid-sized model with good retrieval |
| Anything that reads regulated data | Where the data is processed | A model you host, or a hosted one in an approved region |
| Checking another agent's work | Not sharing the first one's habits | A different model from the one that did the work |
The fourth row decides more choices in the Gulf than any benchmark does. Before comparing quality, find out where each option would process your prompts, and under which contract. A hosted model reached through your existing cloud provider and one reached through its maker's own API can be the same model with different answers to that question. We have written separately about when hosting a model yourself is worth it.
Changing model is a test, not a rewrite
With the test cases in place, a change of model follows the same steps as any other change to production.
- Run the cases. The new model does every job in the set. Compare its answers with the known right ones, and with the current model's.
- Read the disagreements. The score matters less than the cases where the two differ. Ten minutes with those tells you what kind of mistakes the new model makes.
- Run it in the shadows. For a week or two, the new model does the real work alongside the old one, and its results go nowhere but a log.
- Switch, for one agent. Not for all of them on the same day.
- Keep the way back. The old model stays configured until the new one has proved itself.
Expect to adjust the instructions a little. A different model may need a rule stated that the old one followed without being told, or may do better with less explanation. That is an afternoon's work when you have the cases to check it against, and guesswork when you do not.
Put one door in front of them all
Once more than one model is in use, it pays to send every request through one place: a gateway that holds the keys, applies a budget to each agent, decides which model a request goes to, and keeps the log.
It makes the change described above a line of configuration. It also answers the questions that finance and security will ask sooner or later: who is spending what, and which prompts went where.
What to keep an eye on
- Retirement dates. Every hosted model has one. Put them in the same calendar as your certificate renewals.
- Cost for each job, not for each token. A cheaper model that needs three attempts is not cheaper.
- Limits on use. Each provider restricts how much you can send in a minute. A second model is also a second source of capacity on a busy day.
- Quiet changes. Some model names point at whatever is newest, so the model behind a name can change without your doing anything. Pin a version where you can, and run your test cases on a schedule, not only when you choose to change.
The short version
Build the agent around its tools, its limits, its test cases and its record. Treat the model as a part. Then the next time the order at the top changes, moving is a test run and a decision, not a project.
This is how the agents in our own service are built: on Claude, GPT, Gemini or a model you host, chosen for the job and for your data rules, and changed when something better passes the same tests.