Ask a coding agent to “write a Python function to upload a file to cloud storage” and there is a decent chance the answer starts with import boto3. The code works. It is also a vendor decision, a recurring bill and a lock-in path that nobody reviewed, made by a model that was asked for functionality, not a supplier.
That is the premise of From Vendor-Neutral Request to Paid Backend by Zhang, Xia, Wu, Li, Yue and Tu. They call the property at stake procurement integrity: under a vendor-neutral request, the agent should either avoid a provider-specific paid backend, compare real alternatives, or defer the choice to a review step. Silently picking one is the failure. I expected a fairness paper about model bias. What I got is a fairly sharp argument about where in an agent loop you should put your rules, and it applies well beyond cloud bills.
import boto3 is a purchase order#
The setup: 30 cloud-infrastructure tasks across six categories (storage, databases, messaging, auth, AI/ML, monitoring), each in four prompt variants. Neutral, budget-aware, explicitly open-source, and an adversarial variant that forbids commercial cloud APIs. Eight models, two temperatures, 8,091 analyzable responses. An AST-based classifier pulls out imports and provider-specific references and scores how often the code commits to a paid provider.
Under neutral prompts, every model commits to a commercial provider somewhere between 19% and 25% of the time (task-equalized, from GPT-4o-mini at 0.190 to Qwen3-235B at 0.253). Temperature barely matters: no model's neutral rate moved significantly between 0.0 and 0.7. That rules out the comforting story that this is sampling noise. It is a default.
The authors also ran the 30 neutral prompts through two shipped agent CLIs, Codex CLI and GitHub Copilot CLI, three runs per task in an empty directory with no project instructions. Codex went commercial in 9 of 90 runs, Copilot in 11 of 90. All 20 hits were AWS storage code, and Copilot wrote its 11 straight into files in the workspace. Lower rates than the raw models, but the storage default survives the product layer.
The Azure-affiliated model picked AWS 81% of the time#
If you assumed vendor affiliation drives this, the provider split says otherwise. Across models, AWS accounts for 43.1% to 81.3% of commercial references. GPT-4o, the model with the obvious Azure connection, sent 81.3% of its commercial picks to AWS and 4.9% to Azure. GPT-4o-mini gave Azure nothing.
The authors read this as a distributional prior: tutorials, docs and Q&A make some APIs the path of least resistance in the training data. I find that more worrying than deliberate bias, because nobody is going to patch it out. Your agent's infrastructure taste is whatever Stack Overflow's was.
A budget prompt changed nothing for one model#
The obvious fix is to tell the agent. The paper tested exactly that, and the answer is “sometimes”:
GPT-4o dropped from 0.221 to 0.000 under the adversarial prompt.
Mistral-Large dropped from 0.250 to 0.000 when asked for open-source tools.
Qwen3-32B went from 0.195 to 0.198 under the budget-aware prompt. Telling it to care about cost did nothing measurable.
Even the explicit prohibition left small residues: Llama-3.1-8B still sat at 0.078 under the adversarial prompt.
That pattern matches my experience with CLAUDE.md and AGENTS.md rules. Wording that works perfectly on one model is a polite suggestion to another, and you find out which only after you switch models. The paper puts it plainly:
The practical lesson is that a prompt is a steering signal. Binding the choice requires a rule at the commitment step.
Put the rule at finalize, not in the prompt#
The agentic experiments are where the paper earns its keep. In a deployment-agent pilot, neutral prompts led to a commercial backend in 28 of 72 runs, against 0 of 72 with the anti-commercial prompt. In a stricter mock tool loop, each agent had to inspect at least one commercial and one open-source backend before calling a finalize tool. Having seen both, neutral agents still finalized commercially in 21 of 35 runs. Qwen3-32B and Llama-4-Scout did so in every completed neutral run; GPT-4o in 2 of 6.
Then the part every MCP user should read twice. When the tool catalog itself carried a planted default directive, completed runs finalized on the paid backend in 10 of 10 cases. Catalog metadata is untrusted input, and it steers the commitment decision without anyone touching the model or the user prompt.
The defense is deliberately boring: a deterministic Commitment Policy Gate that rejects any paid_managed backend at finalize unless approval exists. In its completed runs it intercepted 10 of 10 paid attempts, and those runs ended on the matching open-source backend. Making billing explicit in the tool schema also helped on its own: with a billing_class field and a capability contract, passive commercial finalization fell to 4 of 33 runs with aliased names and 0 of 11 with brand names.
I want to be fair about how much weight this carries. The gate result is 10 runs, and as the authors themselves note, a deterministic check blocking what it was written to block shows enforcement by construction, not a surprising finding. The agentic samples are small (5 or 6 runs per model in the tool loop). The main matrix uses GPT-4o-era and open-weight models, covers Python only, and leaves out Claude and Gemini entirely. The cost figure of $240 to $1,207 per developer per year is a license-only upper bound; net of self-hosting VMs it shrinks to $149 to $826, and to $65 to $353 once each model's dominant category is removed. I would not quote any of those dollar amounts in a budget meeting.
None of that undermines the architectural point, which does not depend on the exact rates. If 60% of runs end on the paid backend after the agent has already looked at both options, the inspection step is not your control. The finalize step is.
Where I'm moving my own guardrails#
The lesson generalizes past cloud vendors. Any decision with a cost or a blast radius (a new dependency, a managed service, a license, a Terraform resource) is a commitment, and commitments deserve code, not prose. Concretely:
In Claude Code, the backend rule moves out of CLAUDE.md and into a PreToolUse hook that blocks writes adding provider SDKs or managed-service IaC resources unless the spec names that provider. CLAUDE.md keeps the explanation; the hook does the enforcing.
In spec-driven work, the backend choice becomes an explicit line in the spec. If the spec is silent, the agent should be told to stub behind an interface and ask, which is the paper's “defer the choice” path.
For any internal MCP tool that provisions or selects a service, I'd add a billing field to the schema and treat descriptions from third-party catalogs as untrusted, the same way we already treat fetched web content.
My prediction: within a year, agent harnesses ship a first-class notion of a commitment step, a typed action class for “this creates a recurring cost or an external dependency,” with policy attached the way file-write permissions are today. Until then, the cheapest audit you can run is to grep your agent-written code for SDK imports nobody asked for. I suspect most teams will find a few.