Skip to content
Dashboard

What can you build with GPT-6 Sol and Luna?

Content Engineer

You can build support workflows, document assistants, and coding agents with GPT-6 Sol and Luna. Sol suits investigations with dependent steps, while Luna targets focused tasks at high volume. Use AI Gateway and AI SDK to call either model from your application.

Copy link to headingWhat would a support workflow look like?

Consider a customer who writes: "I received two invoices for the same order and need help checking them." Resolving the request involves assigning it to the right team and retrieving billing records to establish why two invoices exist. The customer's message alone cannot tell you whether there was a duplicate charge.

You could divide the work across these components:

Operation

Component to start with

Information passed onward

Summarize the request

Luna

Short summary for the support inbox, stored beside the original ticket

Select a queue

Jev from TypeSafe AI

Proposed queue and its probability, based on the original ticket and category definitions

Retrieve records

Application-defined lookup

Authorized order and invoice records, or an explicit lookup failure

Investigate a discrepancy

Sol

Finding supported by records, or unresolved questions for a support agent

Draft a reply

Luna

Customer response based on a confirmed resolution

Keep the original ticket available throughout the workflow because a summary can omit a qualification or a second issue. The summary helps a support agent scan the inbox; routing uses the customer's full message. Store the queue assignment separately from the investigation's finding so the system can distinguish where the ticket belongs from whether the billing concern has been resolved.

Copy link to headingHow do you make the first call through AI Gateway?

AI Gateway routes model requests and records usage and cost. You can call it from your existing application, including applications hosted outside Vercel.

Follow the setup guide to install the AI SDK and configure authentication. Vercel deployments can use OIDC without managing an API key. You can also authenticate by setting AI_GATEWAY_API_KEY as an environment variable in your application.

Once authentication is configured, this call uses GPT-6 Luna to produce the support-inbox summary:

import { generateText } from 'ai';
const { text } = await generateText({
model: 'openai/gpt-6-luna',
prompt:
'Summarize this support ticket in one sentence: ' +
'I received two invoices for the same order and need help checking them.',
});
console.log(text);

The summary should preserve that the customer received two invoices and wants them checked. Review whether the returned wording turns that report into an unsupported claim about charges or refunds before using this prompt across your inbox. Your application can save an acceptable summary beside the original ticket.

To compare Sol on the same task, change the model identifier to openai/gpt-6-sol. Use the same ticket and check whether either summary loses information the support agent needs. The routing and record lookup described below are separate operations you add to the application.

Copy link to headingHow can Jev choose the support queue?

Jev returns typed decisions with native probabilities from supplied evidence. Give it the original ticket and a question asking which queue should receive it. The possible answers need descriptions that distinguish their responsibilities:

  • Billing handles invoices, charges, and payments.

  • Technical support handles problems using the product.

  • Needs review covers requests that cannot be assigned from the available information.

The AI SDK's experimental evaluation API provides experimental_evaluate for Choice, Score, and Boolean questions. Queue selection uses a Choice question with the ticket supplied as the state to evaluate. Measuring the resulting decisions requires a separate set of tickets labeled by reviewers, against which you can compare the model's selections.

Use those labeled examples to choose a probability threshold for automatic assignment. Application code can send a ticket to billing or technical support when the selected queue meets that threshold. Low-probability results and the explicit needs-review outcome go to a person. Save the selection with the ticket so an agent can correct a misrouted request.

Sol and Luna can also classify tickets through structured output. The evaluation API's language-model adapters omit probability distributions from Choice and Score answers, so they cannot supply the selected-option probability used by this routing rule. Handle a missing distribution explicitly if you switch providers. The evaluation API is experimental and may change in patch releases.

Copy link to headingHow does the assistant retrieve the invoice records?

Once the ticket reaches billing, an order lookup can supply the invoices and payment statuses needed to investigate it. Define a function that accepts an order identifier and retrieves the corresponding records from your billing system. Use an identifier already attached to the ticket, or ask the customer for it if the application has no reliable way to identify the order.

With function calling, the model can request your lookup and supply its arguments. Your application checks access to the order, executes the function, and returns the retrieved records for the model to interpret. Include record identifiers so a support agent can inspect the evidence behind the eventual explanation.

If your billing service exposes the lookup through a remote MCP server, that server executes the operation. Choose the integration that matches where your records and access controls live.

To extend the earlier example, add an AI SDK tool definition and execution handler for the lookup. Direct OpenAI integrations use the Responses API for Sol and Luna tool workflows. Chat Completions supports function calling only with reasoning effort set to none.

Copy link to headingWhen should Sol investigate and Luna draft the reply?

Suppose the lookup returns two invoice records with different identifiers but no explanation of why both exist. Sol can investigate using the ticket, those records, and any additional tools you provide for retrieving billing history. If the evidence remains inconclusive, preserve the unresolved question for a support agent instead of treating a suggested cause as the resolution.

Once a support agent confirms that one invoice replaced a canceled invoice and verifies the payment status, Luna can draft the customer reply. Supply the confirmed resolution with its supporting records and specify what the customer needs to know. In this case, that includes which invoice remains valid and whether the customer needs to take any action.

Store the confirmed resolution separately from the generated wording so edits to the reply do not overwrite the underlying finding. The support agent can then adjust the tone or detail while retaining a record of what was established.

Use Structured Outputs when application code needs named fields, such as a draft reply and a list of supporting record identifiers. It constrains the response to a supported JSON schema. Check that the identifiers belong to the retrieved records and that those records support the reply's claims. Refusals and incomplete responses need their own handling before the application can save a usable draft.

Copy link to headingWhat else can you build with the same models?

An internal-document assistant can answer questions using company policies or project documentation. For an expense question, retrieve the policy that applies to the employee's region. Luna is a candidate for questions answered in one passage; Sol is a candidate when several documents need to be reconciled.

For a direct OpenAI implementation, file search retrieves information from files uploaded to a vector store, a searchable collection. OpenAI executes the search through the Responses API. Your application configures the collection and limits which documents the assistant can access. Retain document titles and effective dates in the evidence so the answer can distinguish the current policy from an earlier version.

Coding assistants need repository access and an environment for running checks. Sol supports shell execution and patch application through configured tools. Give a bug-fixing assistant a reproduction and have it return the proposed patch with the results of the checks it ran. The task record should also identify failed or unavailable checks so the reviewer can assess what remains unverified.

Copy link to headingWhat happens when a step fails?

The next action depends on which part of the workflow failed. If a lookup finds no matching order, ask for a corrected identifier or send the ticket for review. Keep the failed lookup in the task record so the next person can see what was already attempted.

For failed model requests, AI Gateway model fallbacks let you configure backup models tried in order. Each backup must support the response format and tools the step expects. Record which model served the request so you can trace an unexpected result.

Escalating an unresolved ticket to Sol requires a separate application rule. The model might return a valid response while the billing question remains unanswered. In that case, route the ticket to further investigation or human review based on the available evidence. Limit repeated attempts and retain the records gathered.

Before releasing the workflow, test the complete path with tickets that require different outcomes. An ambiguous request should reach review, while a ticket with conflicting records should remain unresolved until there is enough evidence to explain them. Check that the final reply reflects the confirmed resolution and that any handoff gives the next person enough context to continue.

Copy link to headingDoes a generated response complete the support action?

Sending a reply or issuing a refund requires an operation with the necessary access. Your application may implement that operation or connect to a service that executes it. Define which actions the assistant can request and which need approval, then inspect the operation's result before reporting success.

For the first version of this workflow, save the proposed reply for a support agent. The reviewer can inspect the original ticket, billing records, and confirmed resolution together before sending it to the customer.

Copy link to headingFrequently asked questions

Copy link to headingDoes a model call update my database?

Text generation alone does not update a database. Changes require a connected tool or service with permission to perform the operation. The application should check its result before telling the user that a change succeeded.

Copy link to headingDoes structured output guarantee correct information?

No. Structured output controls the response's format, but its values can still be incorrect. Check factual fields against the source material and handle refusals or incomplete responses before using the result.

Copy link to headingCan one application use both Sol and Luna?

Yes. One support application can use Sol to investigate conflicting records and Luna to draft a reply from a confirmed resolution. Application code selects the model for each request and supplies the relevant evidence.

Copy link to headingCan I use AI Gateway without managing an API key?

Yes. Vercel deployments can authenticate with OIDC, which the AI SDK resolves automatically when AI_GATEWAY_API_KEY is not set. You can also configure AI_GATEWAY_API_KEY as an environment variable to authenticate with an API key.

Ready to deploy?