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:
var response = llm.generateText({
prompt: "Tell me about the history of bears.",
documents: [/* array of llm.Document objects */],
modelFamily: llm.ModelFamily.COHERE_COMMAND
});
console.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?