Supported Models for llm.generateText in NetSuite 2026.1
NetSuite 2026.1 introduces supported models for llm.generateText, enhancing text generation capabilities with features like RAG and preambles.
TL;DR Opening
Starting in NetSuite 2026.1, the llm.generateText(options) and llm.generateTextStreamed(options) methods now support various models, enabling enhanced text generation capabilities. These changes are significant as they incorporate retrieval-augmented generation (RAG) and preambles to provide more contextualized outputs for developers.
What's New
NetSuite 2026.1 brings exciting advancements to the SuiteScript API with the introduction of new models for the llm.generateText and llm.generateTextStreamed methods. Below are the supported models and their key capabilities:
| Enum | Value | Supported Capabilities | Notes |
|---|---|---|---|
| ModelFamily.COHERE_COMMAND | cohere.command-a-03-2025 | Yes (RAG), Yes (Preambles) | - |
| ModelFamily.COHERE_COMMAND_LATEST | cohere.command-a-03-2025 | Yes (RAG), Yes (Preambles) | - |
| ModelFamily.GPT_OSS | openai.gpt-oss-120b | No (RAG), Yes (Preambles) | - |
| ModelFamily.GPT_OSS_LATEST | openai.gpt-oss-120b | No (RAG), Yes (Preambles) | - |
Key Features
- Retrieval-Augmented Generation (RAG): This allows documents with text content to be provided using the
options.documentsparameter. When used, these documents augment the LLM's responses, enhancing the context and relevance of the output. The LLM returns appropriate citations for the information it used. - Preambles: You can facilitate a stronger contextual foundation for the LLM's responses by providing a preamble via the
options.preambleparameter. This acts as an introductory guide to the model for generating responses according to specific needs.
How to Use the Models
When calling the llm.generateText or its streamed counterpart llm.generateTextStreamed, the primary parameters to consider include:
options.prompt: The main input for the LLM that dictates the output.options.documents: List of documents to augment the response (for Cohere models only).options.modelFamily: Specifies which LLM to utilize.
Example Code:
1"text-purple-400">var response = llm.generateText({2 prompt: "Tell me about the history of bears.",3 documents: [/* array of llm.Document objects */],4 modelFamily: llm.ModelFamily.COHERE_COMMAND5});6console.log(response.text);Who This Affects
- Developers: Those utilizing the SuiteScript 2.1 framework to build applications that require enhanced text generation capabilities.
- Administrators: Users managing the settings for SuiteScript and AI configurations.
- Data Analysts: Professionals needing to leverage text generation for reporting or analytics.
Key Takeaways
- NetSuite 2026.1 introduces new models for text generation via
llm.generateTextandllm.generateTextStreamed. - The support for RAG and preambles enhances the contextual relevance of generated text.
- Developers can utilize additional documents to improve output quality, particularly with supported models like Cohere.
Frequently Asked Questions (4)
Are RAG features available for all supported models in llm.generateText?
What is the purpose of the 'preamble' in the llm.generateText method?
Which model should I use to incorporate additional documents into the text generation?
Is it necessary to specify a model family when using llm.generateText?
Weekly Update History (1)
Updated llm.ModelFamily as follows: Added the COHERE_COMMAND and COHERE_COMMAND_LATEST enum values, both of which map to the cohere.command-a-03-2025 model. This model is now the default model when interacting with an LLM using methods in the N/llm module, such as llm.generateText(options). Removed the COHERE_COMMAND_R and COHERE_COMMAND_R_PLUS enum values. If you use these values in existing scripts, their value is now undefined, and method calls will use the new default model instead (cohere.command-a-03-2025).
View Oracle DocsWas this article helpful?
More in SuiteScript
- N/https Module: Binary File Support in NetSuite 2025.2
NetSuite 2026.1 adds binary file support to N/https for streamlined file handling.
- API Governance Units Calculation in NetSuite 2026.1
NetSuite 2026.1 introduces examples illustrating API governance unit calculations for both user event and scheduled scripts.
- Attach and Detach Operations in NetSuite 2026.1
Attach and detach operations for record relationships in NetSuite enhance data management and connectivity.
- Create-Form Operation in NetSuite 2026.1 REST Web Services
Create-form operation in NetSuite 2026.1 APIs streamlines record creation and enhances efficiency.
Also from NetSuite 2026.1
- Custom Labels for Additional Item Prices in NetSuite 2026.1
Custom labels enhance transaction summaries in NetSuite, improving clarity for item prices.
- Applied Trans Date and Period Enhancements in NetSuite 20...
Latest updates in NetSuite 2024.1 enhance Accounting SuiteApps with transaction line distribution features.
- Data Not Copied from Production to Sandbox in NetSuite 2026.1
In NetSuite 2026.1, key data like domains and customer roles are not copied to sandbox accounts during refreshes, impacting setup.
- Available Items Only Feature in NetSuite 2026.1
Available items only filtering boosts sales efficiency in NetSuite 2026.1 with Intelligent Item Recommendations.
Advertising
Reach SuiteScript Professionals
Put your product in front of NetSuite experts who work with SuiteScript every day.
Sponsor This Category