Why a Model in the Data Path Breaks Retry
- Every major vendor documents non-determinism in its own docs. Anthropic states that even with
temperatureset to 0, “the results will not be fully deterministic and identical inputs may produce different outputs across API calls”. OpenAI’sseedparameter is a documented “best effort” and states “Determinism is not guaranteed”. - The mitigation everyone reaches for is being withdrawn: on Claude Opus 4.7 and later, setting
temperature,top_portop_kto a non-default value returns a400error. The knob is deprecated, not just insufficient. - Integrations are built on at-least-once delivery and replay. A retry is only safe when the transform is a pure function. Put a model in the transform step and a redelivered order writes different values, with an HTTP 200 on every hop and no error in any log.
- Inside NetSuite the cost gate arrives before the correctness gate:
llm.generateTextcosts 100 governance units, so a 1,000-unit user event script gets 10 calls total, before any record I/O. - AI belongs where a wrong answer is a suggestion a human accepts — monitoring, anomaly triage, proposed field mappings. Not where a wrong answer is a posted transaction.
llm.generateText callllm.generateText calls a 1,000-unit user event script can make before terminationtemperature is set to a non-default valueIntegration vendors spent 2026 marketing the move from rule-based sync to “intelligent data flows”. The pitch is that a model in the pipeline maps fields, resolves records, and adapts to schema changes that would otherwise need a code change. The pitch is not wrong about what a model can do. It is silent about the one property the surrounding system already depends on and a model cannot supply: given the same input, produce the same output.
That property has a name in integration work — determinism — and it is what makes retry safe. Every queue, every webhook receiver, every scheduled job in an e-commerce integration assumes that replaying a message is harmless because replaying it produces the same write. All four vendors whose APIs you would actually call document, in their own words, that this assumption does not hold for model inference. This post reads those documents, does the governance arithmetic for NetSuite, and sets out where a model can sit in an integration without turning your retry policy into a mutation policy.
On this page
- What a model in the data path actually changes
- Every vendor documents that identical inputs can return different outputs
- Anthropic now returns HTTP 400 if you set temperature
- Why this breaks retry specifically
- NetSuite prices the call before you reach the correctness question
- llm.generateText runs only in server scripts, only in some regions
- Running out of free capacity is an integration outage
- Data retention is a property of the endpoint, not the vendor
- The model has a retirement date; your sync code does not
- Where AI does belong in an integration
- Four patterns that keep the model out of the write path
- Pre-flight checklist before a model touches order data
- When this does not apply
What a model in the data path actually changes
A model in the data path changes one thing that matters: the transform step stops being a pure function. Everything else about the integration — the queue, the retry policy, the dedupe guard, the reconciliation report — was designed on the assumption that it is.
Rule-based sync has a property that is easy to overlook because nothing draws attention to it. Run map_order_to_sales_order(order_1042) a thousand times and you get byte-identical output a thousand times. That is why a redelivered webhook is a non-event: the second write is either identical and idempotent, or it is caught by a dedupe key derived from the same deterministic output. The reconciliation job can recompute what the pipeline should have written and diff it against what it did write, because “should have written” is computable.
Replace that function with a model call and all three of those properties leave at once. The second write is not guaranteed identical. The dedupe key, if it is derived from model output, is not guaranteed identical either. And no reconciliation job can recompute the expected value, because there is no expected value — only a distribution. None of this shows up as an error. Every call returns HTTP 200. The failure surfaces weeks later as two sales orders that should have been one, or a field that reads differently on Tuesday than it did on Monday, with a clean log on both days.
Every vendor documents that identical inputs can return different outputs
This is not an inference from how transformers work. It is written down by the vendors, on their own documentation pages, in language that leaves no room for a workaround. The table below collects the four surfaces an e-commerce integration would realistically call, with each vendor’s own statement about reproducibility.
| Reproducibility | Anthropic Claude API | OpenAI API | Google (Firebase AI Logic) | NetSuite N/llm |
|---|---|---|---|---|
| Control exposed | temperature — deprecated on Opus 4.7+ |
seed plus system_fingerprint |
None — seed not supported |
None exposed to the script |
| Vendor’s stated guarantee | Results “will not be fully deterministic” even at temperature 0 | “Determinism is not guaranteed” | No reproducibility claim made | Responses “use creativity” |
| Setting the knob | Returns 400 on Claude 4.7+ for non-default values |
Accepted; still best-effort only | Parameter not accepted | No knob in the module |
| Scope of the caveat | First-party and third-party cloud inference alike | Backend config changes tracked via fingerprint | — | Oracle disclaims liability for interpretation |
Verdict: there is no vendor in this table from which you can buy reproducible inference. Two document that their reproducibility control is best-effort, one does not expose the control at all, and one has begun rejecting it outright. Design the integration so that reproducibility is not required, because it is not purchasable.
Anthropic’s wording is the most explicit of the four. Its glossary states that “even with temperature set to 0, the results will not be fully deterministic and identical inputs may produce different outputs across API calls”, and adds that this “applies both to Anthropic’s first-party inference service and to inference through third-party cloud providers”. Routing the same model through a hyperscaler does not restore the property.
Anthropic now returns HTTP 400 if you set temperature
The standard mitigation for model variance — set temperature to 0 and treat the output as stable — now fails as a request error on current frontier models. Anthropic’s model deprecation page lists temperature, top_p and top_k as deprecated for Claude Opus 4.7 and later, and documents the behaviour plainly: the API “returns a 400 error when set to a non-default value” on those models. The recommended replacement is prompting, not a sampling parameter.
For an integration team this is a version-pin problem wearing a correctness problem’s clothes. Code written against an earlier model, carrying temperature: 0 in the request body as a deliberate determinism measure, keeps working until the model ID is bumped to a 4.7-class model — at which point every call fails with a 400. The failure is loud, which is the good news. The bad news is what the loud failure reveals: the parameter that team was relying on was documented as insufficient for the whole time it appeared to work.
Treat sampling parameters as version-scoped API surface, not as configuration. Pin exact model IDs, and re-read the parameter deprecation table before any model upgrade. The same discipline applies to NetSuite’s rate-limit rejection codes, where the retry trigger everybody assumes is wrong too.
Why this breaks retry specifically
Non-determinism is harmless in a chat interface and dangerous in a pipeline for one reason: pipelines retry. At-least-once delivery is the default guarantee in every message broker and webhook system a commerce stack uses, which means every message will eventually be delivered more than once. The integration absorbs that with a dedupe guard, an idempotency key, or an upsert keyed on a stable field.
Each of those defences assumes the second pass computes the same value as the first. A model in the transform step breaks the assumption at exactly the point the defence depends on it. If the idempotency key is derived from model output, two deliveries produce two keys and the guard does not fire. If the key is derived from source data but the written fields come from the model, the guard fires and silently discards a write that differed from the one already committed — you keep whichever version arrived first, permanently, and never learn that the other existed.
The diagram states the conclusion the prose already made: the difference between the two lanes is not accuracy. Both model outputs are reasonable. The difference is that one lane’s duplicate guard works and the other’s does not.
NetSuite prices the call before you reach the correctness question
Inside NetSuite the argument is usually settled by arithmetic rather than by architecture. Oracle’s SuiteScript 2.1 API governance table charges 100 usage units for llm.generateText, llm.generateTextStreamed and llm.evaluatePrompt, and 50 units for llm.embed. Those numbers meet a second, separately documented table of per-script-type budgets, and the two pages do not reference each other.
| Script type | Total usage units per script | Maximum llm.generateText calls |
|---|---|---|
| User event, client, Suitelet, workflow action | 1,000 | 10 |
| RESTlet | 5,000 | 50 |
| Scheduled | 10,000 | 100 |
| Map/Reduce | No overall limit; governed per invocation | Not bounded by a script total |
Verdict: the ceilings above are gross, not net — every record.load, record.save and search.run in the same execution draws from the same budget, and exceeding it terminates the script. A user event script that calls a model once per line item hits the wall on an eleven-line order. Map/Reduce is the only shape that scales past a few hundred records, which is the same conclusion reached in the deeper treatment of calling AI APIs from SuiteScript under governance.
llm.generateText runs only in server scripts, only in some regions
Two deployment constraints on the N/llm module are documented and easy to miss until integration test. First, the module is available only for server scripts — there is no client-side path, so any browser-side enrichment has to round-trip through a Suitelet or RESTlet you write and govern yourself.
Second, availability is an account attribute rather than a product feature. Oracle states that “SuiteScript Generative AI APIs (N/llm module) are available only for accounts located in certain regions”, pointing at a separate feature-availability page for the list. An integration design validated in one subsidiary’s account can therefore fail to deploy in another, with no code difference between them.
The practical consequence is a sequencing rule: confirm N/llm availability for the specific account and region before the design depends on it, not during the build. This is the same class of account-level gate that decides which NetSuite AI features a partner can commit to at all, covered across the AI for commerce teams guide library.
Running out of free capacity is an integration outage
The N/llm module’s free usage mode has a failure behaviour that belongs in your alerting design rather than your billing spreadsheet. Oracle documents the metering plainly: “each successful response to NetSuite from the OCI Generative AI service counts as one use”, and “when the capacity is used completely, the LLM module returns an error for subsequent calls until the next month”.
Read that as an operational statement rather than a commercial one. A pipeline that depends on N/llm and exhausts its monthly capacity does not degrade, queue, or fall back — it errors, and it keeps erroring for the remainder of the calendar month. The reset is the first of the month, not an hour later, so the worst case is a multi-week outage of whatever the model call was doing.
Two mitigations follow directly. Read the remaining balance with llm.getRemainingFreeUsage() and alert on a threshold rather than on the error, remembering that Oracle documents a separate monthly quota for embedding methods via llm.getRemainingFreeEmbedUsage(). And make every model call in the pipeline fall back to a deterministic default, so exhaustion degrades a suggestion rather than stopping a sync.
Data retention is a property of the endpoint, not the vendor
Order payloads carry names, addresses and line-item history. Where that data rests after the API returns is decided per endpoint and per model, not per vendor — which is why “we use a zero-retention provider” is not a statement that can be true on its own.
OpenAI documents that “by default, abuse monitoring logs are generated for all API feature usage and retained for up to 30 days, unless longer retention is required by law”, with zero data retention “currently subject to prior approval by OpenAI and acceptance of additional requirements”. Anthropic states that conversation content “is not retained by default”, then publishes a feature-eligibility table showing which endpoints break that default.
The entry in that table with the sharpest consequence for integration work is batch processing: it is listed as not eligible for zero data retention, with “29-day retention; async storage required”. Batch is the cost-optimal way to run a model over a whole catalogue or a month of orders. So the standard cost optimisation for bulk AI work is also the one that moves your customer data from not-stored to stored for 29 days — a change of data-protection posture made by an engineer tuning spend, on a page nobody re-reads. Files, code execution and connector features carry their own retention entries for the same reason, and flagged content may be retained for up to two years regardless of arrangement.
The model has a retirement date; your sync code does not
Every other dependency in a commerce integration ages slowly. A model is the only component in the stack with a published expiry date, and the vendors say so on purpose. Anthropic commits to “at least 60 days’ notice before model retirement for publicly released models” and publishes forward-looking “not sooner than” dates for each active model — as of August 2026, claude-opus-5 carries a tentative retirement no sooner than 24 July 2027.
Sixty days is a reasonable commitment and a short planning horizon for an ERP change window. It is also only half the exposure, because a replacement model is not a drop-in for a behavioural dependency: the new model is contract-compatible and output-different, so extraction and classification results shift with no code change on your side. That is a silent quality regression unless a versioned evaluation set is run against the replacement before the cutover.
Lifecycle policy varies enough between vendors that it belongs in the selection criteria rather than the risk register — the comparison of vendor retirement clocks sets out how far the notice commitments diverge and why a partner cloud can extend or shorten them independently.
Where AI does belong in an integration
The placement rule that survives all of the above is short: a model may sit anywhere a wrong answer is a suggestion, and nowhere a wrong answer is a posted transaction. Non-determinism is a defect in a write path and a non-issue in an advisory path, because an advisory path already assumes the output needs judging.
That admits three high-value applications and excludes one category entirely. Anomaly detection over sync telemetry qualifies: a detector that learns the normal error and latency profile of an integration flags deviations a static threshold misses, and a false positive costs an operator two minutes. Triage and natural-language query over integration logs qualifies for the same reason — the model proposes a filtered view, the engineer confirms it against the raw log. Field-mapping suggestion qualifies as long as the suggestion lands in a review queue and a human commits the mapping, at which point the committed mapping becomes deterministic code and the model is out of the runtime path forever.
What does not qualify is anything that decides whether an order syncs, what quantity to write, or which record an order maps to. Those are financial writes. Reconciliation work of that kind can still use a model as a tiebreaker inside a deterministic workflow — the pattern set out for AI invoice reconciliation in NetSuite keeps matching rules authoritative and reserves the model for the residue a rule cannot settle.
Four patterns that keep the model out of the write path
Each pattern below preserves replay safety by ensuring that whatever the model produced is fixed before the write happens, or is never written at all.
- Propose-and-commit. The model writes to a review queue, never to the record. A human accepts, and acceptance emits deterministic configuration. Field mapping, category assignment and data-quality rules all fit this shape.
- Freeze the output, then treat it as data. Call the model once, persist the result against the source record with the model ID and timestamp, and have the pipeline read the persisted value. Retries replay the stored value rather than re-inferring, which restores idempotency at the cost of one stored column.
- Deterministic core, model on the side channel. The sync path stays rule-based. Sync events, errors and durations fan out to a log aggregation layer where the model runs on telemetry — a layout that structured OpenTelemetry logs make practical without touching the pipeline.
- Model as tiebreaker under a rule. Deterministic rules decide every case they can. Only the residue reaches the model, the model’s answer is recorded with its reasoning, and a confidence floor routes low-confidence cases to a human instead of to the ERP.
Pattern two deserves the emphasis. Freezing the inference result is the cheapest way to keep a model in a pipeline that must remain replayable, and it is the pattern most often skipped because calling the model inline looks simpler in the first sprint.
Pre-flight checklist before a model touches order data
Work down this list before any model call ships into an integration that writes to an ERP or storefront.
- Confirm the model call sits outside the write path, or that its output is frozen and persisted before the write.
- Derive every idempotency and dedupe key from source data only, never from model output.
- Pin the exact model ID in configuration and record it alongside every stored inference.
- Re-read the vendor’s parameter deprecation table before any model version change.
- Calculate the governance cost per execution: units per call multiplied by calls per record, plus record I/O, against the script type’s budget.
- Verify N/llm regional availability for the specific account, not the product.
- Alert on remaining free capacity with
llm.getRemainingFreeUsage(), not on the exhaustion error. - Give every model call a deterministic fallback so exhaustion or timeout degrades output instead of stopping the sync.
- Check the retention posture of the specific endpoint you are calling, including batch, files and connector features.
- Keep a versioned evaluation set and run it against any replacement model before cutover.
- Log every model call with inputs, outputs, model ID and latency, so a bad write can be reconstructed.
Get the working checklists
The runbooks and decision checklists from these guides, as printable PDFs — free in the SoftXone guide library.
When this does not apply
The argument above is about write paths in systems of record. Three situations fall outside it, and treating them with the same caution wastes the technology.
Read-only surfaces are unaffected. Search relevance, on-site recommendations, support-reply drafting and merchandising copy have no replay semantics to break, because nothing downstream reconciles them. Variance there is a quality question, not a correctness one.
One-shot migrations are also outside it. A catalogue clean-up or a historical categorisation pass runs once, gets reviewed, and the output becomes static data — the pipeline that produced it is discarded, so its non-determinism never meets a retry. The same logic covers any batch enrichment whose result is committed to a column and then owned by the database rather than regenerated on read.
Finally, a deterministic wrapper around a model can be safe even in a write path. Constrained decoding into a fixed enumeration, followed by a validation rule that rejects anything outside the allowed set, reduces the model to a classifier over a closed vocabulary. The output is still not reproducible, but the set of possible outputs is small and every member of it is legal — which is a materially different risk than free-text into a memo field. Structured output enforces the shape of a response; it does not make the response the same one twice.
Building the deterministic core
The sync pipeline underneath any AI layer still has to be replay-safe, idempotent, and auditable. That is what NetSuite Integration Pro is built to be.
References
- Anthropic — Claude Platform glossaryAnthropic — states that results are not fully deterministic even at temperature 0, on first-party and third-party inference alike.
- Anthropic — Model deprecationsAnthropic — the 60-day retirement notice commitment, forward-looking retirement dates, and the temperature/top_p/top_k parameter deprecation returning HTTP 400 on Claude 4.7+.
- Anthropic — API and data retentionAnthropic — per-feature zero-data-retention eligibility table, including the 29-day retention on batch processing.
- OpenAI — Reproducible outputs with the seed parameterOpenAI — the seed parameter as best-effort sampling, with determinism explicitly not guaranteed and system_fingerprint as the backend-change signal.
- OpenAI — Data controls in the OpenAI platformOpenAI — the 30-day default abuse-monitoring retention window and the approval requirement for zero data retention.
- Oracle NetSuite — N/llm ModuleOracle — server-scripts-only availability, regional restriction, and the separate monthly free usage quotas for generate and embed methods.
- Oracle NetSuite — SuiteScript 2.1 Generative AI APIsOracle — free limited-use metering, the error returned when monthly capacity is exhausted, and the response-validation caveat.
- Oracle NetSuite — SuiteScript 2.1 API GovernanceOracle — 100 usage units for llm.generateText and llm.evaluatePrompt, 50 for llm.embed.
- Oracle NetSuite — Script Type Usage Unit LimitsOracle — per-script-type unit budgets used for the governance arithmetic in this post.
- Google — Firebase AI Logic model parametersGoogle — documents that the seed parameter is not supported on this surface.
- OpenTelemetry documentationCNCF — the instrumentation standard for the structured integration telemetry an advisory model layer reads.
Frequently asked questions
Can we set temperature to 0 to make AI field mapping deterministic?
No. Anthropic documents that results are not fully deterministic even at temperature 0, and on Claude Opus 4.7 and later setting the parameter at all returns a 400 error. OpenAI describes its seed parameter as best effort and states determinism is not guaranteed. Treat reproducibility as unavailable rather than tunable: call the model once, persist the result against the source record with the model ID, and have retries read the stored value instead of re-inferring.
How many AI calls can a NetSuite user event script make?
Ten. Oracle charges 100 governance units for llm.generateText against the 1,000-unit budget shared by user event, client, Suitelet and workflow action scripts. That ceiling is gross rather than net, because every record load, save and search in the same execution draws from the same budget, so the workable number is lower. RESTlets get 5,000 units and scheduled scripts 10,000. Map/Reduce is governed per invocation rather than by a script total, which is why bulk model work belongs there.
Does calling an AI API put customer order data at risk?
It moves where that data rests, which is a decision worth making deliberately. OpenAI retains API inputs and outputs in abuse-monitoring logs for up to 30 days by default, with zero data retention subject to prior approval. Anthropic does not retain conversation content by default but publishes per-feature exceptions: batch processing carries 29-day retention and is not eligible for zero data retention. Check the specific endpoint you call, not the vendor as a whole.
What happens when NetSuite free AI usage runs out mid-month?
The module returns an error for every subsequent call until the next calendar month. Oracle documents that each successful response counts as one use and that the capacity resets monthly, so exhaustion is a multi-week outage rather than a brief throttle. Read the balance with llm.getRemainingFreeUsage and alert on a threshold instead of on the error, and give every model call a deterministic fallback so running out degrades output rather than stopping the sync.
Is it safe to let AI decide which NetSuite record an order maps to?
No. Record resolution is a financial write and belongs in deterministic code. A wrong mapping posts a transaction against the wrong customer or item, is expensive to unwind, and raises no alert because the call itself succeeds. The safe shape is propose-and-commit: the model suggests a mapping into a review queue, a person accepts it, and acceptance emits deterministic configuration that runs without the model in the path.

Leave a Reply