Skip to content
This repository was archived by the owner on Dec 24, 2025. It is now read-only.

Update models and references to gpt 5#79

Open
polvallverdu wants to merge 4 commits intomainfrom
cursor/update-models-and-references-to-gpt-5-09ba
Open

Update models and references to gpt 5#79
polvallverdu wants to merge 4 commits intomainfrom
cursor/update-models-and-references-to-gpt-5-09ba

Conversation

@polvallverdu
Copy link
Copy Markdown
Contributor

@polvallverdu polvallverdu commented Aug 7, 2025

This pull request contains changes generated by Cursor background composer.

Summary by CodeRabbit

  • New Features
    • Added GPT‑5 Mini and GPT‑5 Chat; highlighted and available for use.
    • Expanded input support across many models (including file uploads; audio for Gemini 2.0 Flash).
    • Chat titles now generated with GPT‑5 Nano for improved quality.
  • Refactor
    • Updated model lineup and specs across providers; retired Horizon Beta.
  • Chores
    • Prepared patch release for boreal.chat.

@cursor
Copy link
Copy Markdown

cursor bot commented Aug 7, 2025

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Aug 7, 2025

🦋 Changeset detected

Latest commit: 8aa3734

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
boreal.chat Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Aug 7, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

Introduces GPT-5 models across the app: adds model features, constants, and icon mappings; removes OpenRouter Horizon Beta; updates chat title generation to use GPT_5_NANO; and adds a changeset declaring a patch release.

Changes

Cohort / File(s) Summary
Release metadata
./.changeset/swift-buses-cross.md
Adds a changeset declaring a patch release with note “Added gpt 5 models”.
Model feature specs
src/lib/common/ai/modelFeatures.ts
Refreshes MODEL_FEATURES: adds OpenAI GPT-5 models and OpenAI OSS models; updates/adjusts context lengths, pricing, and inputModalities (notably adding “file”); removes OpenRouter Horizon Beta entry; adds/updates several Zhipu, Qwen, DeepSeek, Moonshot, Anthropic, Google entries; timestamp bump.
Model constants and registries
src/lib/common/ai/models.ts
Adds GPT_5_NANO, GPT_5_MINI, GPT_5_CHAT; removes HORIZON_BETA; updates MODELS/HIGHLIGHTED_MODELS/FREE_MODELS to include GPT_5_MINI and GPT_5_CHAT; updates MODEL_DETAILS accordingly; GPT_5_NANO defined but not listed in registries.
Icon mappings
src/lib/components/icons/iconMap.ts
Maps GPT_5_MINI and GPT_5_CHAT to OpenAiIcon; removes HORIZON_BETA and OpenRouter icon mapping.
Chat route usage
src/lib/server/orpc/routes/v1/chat.ts
Switches chat title generation non-free model from GPT_4_1_NANO to GPT_5_NANO; imports updated.

Sequence Diagram(s)

sequenceDiagram
  participant U as User
  participant C as Client
  participant S as Server (v1/chat)
  participant T as Title Generator
  participant M as Model (GPT_5_NANO or Free)

  U->>C: Start new chat
  C->>S: POST /v1/chat.new
  alt Free model path
    S->>T: generateChatTitle(LLAMA_3_3_70B_FREE)
    T->>M: Prompt title (free)
  else Non-free path
    S->>T: generateChatTitle(GPT_5_NANO)
    T->>M: Prompt title (GPT_5_NANO)
  end
  M-->>T: Title text
  T-->>S: Title result
  S-->>C: Chat created with title
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~15 minutes

Possibly related PRs

Poem

In moonlit tabs I twitch my ear,
New GPT-5s hop in with cheer.
Icons blink, the models sing,
Titles sprout in one swift spring.
Goodbye Horizon’s distant glow—
Hello new trails where prompts will go! 🐇✨

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch cursor/update-models-and-references-to-gpt-5-09ba

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@polvallverdu
Copy link
Copy Markdown
Contributor Author

@cursor run pnpm format:fix

cursor[bot]

This comment was marked as outdated.

@polvallverdu
Copy link
Copy Markdown
Contributor Author

@cursoragent , remove openrouter's horizon or beta models please

@cursor
Copy link
Copy Markdown

cursor bot commented Aug 11, 2025

Open in Cursor Open in Web

Learn more about Cursor Agents

@polvallverdu polvallverdu marked this pull request as ready for review August 11, 2025 22:00
displayName: "GPT-5-chat",
reasoning: false,
},

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Model Registration Incomplete

The GPT_5_NANO model constant is defined and used for chat title generation, but it is not fully registered within the application's model system. It is missing from the MODELS array, making it an invalid ModelId type and causing TypeScript compilation errors. Furthermore, it lacks corresponding entries in the MODEL_DETAILS object, modelFeatures.ts, and iconMap.ts, which will lead to runtime errors when the application attempts to access its properties or display information.

Additional Locations (2)
Fix in Cursor Fix in Web

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🔭 Outside diff range comments (1)
src/lib/common/ai/modelFeatures.ts (1)

20-428: Add missing GPT_5_NANO entry in MODEL_FEATURES

The constant GPT_5_NANO ("openai/gpt-5-nano") is used in models.ts and in the chat route but isn’t defined in MODEL_FEATURES. This will lead to undefined lookups at runtime.

Please update:

  • File: src/lib/common/ai/modelFeatures.ts
  • Action: Insert a new key "openai/gpt-5-nano" with its contextLength, pricing, and inputModalities.

For example:

  "openai/gpt-5-nano": {
    contextLength: <INSERT_VALUE>,
    pricing: {
      prompt: <INSERT_VALUE>,
      completion: <INSERT_VALUE>,
      image: 0,
      web_search: 0,
      request: 0,
    },
    inputModalities: [/* e.g. "text", "image", … */],
  },

Verify the values against OpenRouter’s model specs or your pricing documentation.

♻️ Duplicate comments (1)
src/lib/common/ai/models.ts (1)

167-167: Existing pricing inconsistency for GPT_5_MINI in FREE_MODELS.

This is a duplicate of a previously identified issue where GPT_5_MINI is incorrectly included in FREE_MODELS despite having non-zero pricing in modelFeatures.ts.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 381573e and 615a369.

📒 Files selected for processing (5)
  • .changeset/swift-buses-cross.md (1 hunks)
  • src/lib/common/ai/modelFeatures.ts (12 hunks)
  • src/lib/common/ai/models.ts (5 hunks)
  • src/lib/components/icons/iconMap.ts (2 hunks)
  • src/lib/server/orpc/routes/v1/chat.ts (2 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (4)
src/lib/server/orpc/routes/v1/chat.ts (3)
src/lib/common/ai/models.ts (2)
  • LLAMA_3_3_70B_FREE (39-39)
  • GPT_5_NANO (18-18)
src/lib/server/ai/agents/title.ts (1)
  • generateChatTitle (17-73)
src/lib/server/ai/agents/main.ts (1)
  • callModel (97-225)
src/lib/components/icons/iconMap.ts (2)
src/lib/common/ai/models.ts (2)
  • GPT_5_MINI (19-19)
  • GPT_5_CHAT (20-20)
scripts/fetchModelFeatures.ts (1)
  • OpenRouterModel (89-104)
src/lib/common/ai/models.ts (1)
scripts/fetchModelFeatures.ts (2)
  • OpenRouterModel (89-104)
  • fetchModelFeatures (20-87)
src/lib/common/ai/modelFeatures.ts (1)
scripts/fetchModelFeatures.ts (2)
  • fetchModelFeatures (20-87)
  • OpenRouterModel (89-104)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Cursor Bugbot
  • GitHub Check: build-and-push
  • GitHub Check: Lint
🔇 Additional comments (12)
.changeset/swift-buses-cross.md (1)

1-5: LGTM!

The changeset follows proper format and accurately describes the patch release for adding GPT-5 models.

src/lib/server/orpc/routes/v1/chat.ts (1)

3-3: Model import updated correctly.

The import has been properly updated from GPT_4_1_NANO to GPT_5_NANO to align with the GPT-5 model transition.

src/lib/components/icons/iconMap.ts (2)

42-43: GPT-5 model imports added correctly.

The new GPT-5 models (GPT_5_MINI and GPT_5_CHAT) have been properly imported and will be available for icon mapping.


71-72: Icon mappings for GPT-5 models are appropriate.

Both GPT_5_MINI and GPT_5_CHAT are correctly mapped to OpenAiIcon, which is consistent with their OpenAI branding.

src/lib/common/ai/models.ts (4)

18-20: GPT-5 model constants defined correctly.

The new GPT-5 model constants follow the proper naming convention and use appropriate OpenAI model identifiers.


81-82: GPT-5 models added to MODELS array.

GPT_5_MINI and GPT_5_CHAT have been properly added to the main models array for availability in the application.


136-137: GPT-5 models highlighted appropriately.

Both models are included in the highlighted models list, which will give them proper visibility in the UI.


262-269: GPT-5 model details configured properly.

The display names and reasoning settings for the new GPT-5 models are appropriate and consistent with the model capabilities.

src/lib/common/ai/modelFeatures.ts (4)

6-6: Generated timestamp updated correctly.

The file has been properly regenerated with a recent timestamp, indicating fresh model features data.


21-31: GPT-5-chat model features configured properly.

The model has appropriate context length (400K tokens), pricing, and input modalities including file support.


32-42: GPT-5-mini model features configured properly.

The model configuration looks appropriate with 400K context length and support for text, image, and file inputs.


98-108: Verify qwen/qwen3-coder:free model features.

The past review flagged this model as missing from MODEL_FEATURES, but it appears to be present now. The previous issue appears to be resolved.

Comment on lines +18 to +20
export const GPT_5_NANO = "openai/gpt-5-nano";
export const GPT_5_MINI = "openai/gpt-5-mini";
export const GPT_5_CHAT = "openai/gpt-5-chat";
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

GPT_5_NANO missing from configuration arrays.

GPT_5_NANO is defined but not included in MODELS, HIGHLIGHTED_MODELS, FREE_MODELS arrays or MODEL_DETAILS. However, it's used in src/lib/server/orpc/routes/v1/chat.ts for title generation, which could cause runtime errors.

Add GPT_5_NANO to the appropriate arrays:

  GPT_OSS_20B,
+ GPT_5_NANO,
  GPT_5_MINI,
  GPT_5_CHAT,

And add a MODEL_DETAILS entry:

  [GPT_OSS_20B]: {
    displayName: "GPT-OSS 20B",
    reasoning: true,
  },
+ [GPT_5_NANO]: {
+   displayName: "GPT-5-nano",
+   reasoning: false,
+ },
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
export const GPT_5_NANO = "openai/gpt-5-nano";
export const GPT_5_MINI = "openai/gpt-5-mini";
export const GPT_5_CHAT = "openai/gpt-5-chat";
// In src/lib/common/ai/models.ts
export const MODELS = [
GPT_OSS_20B,
+ GPT_5_NANO,
GPT_5_MINI,
GPT_5_CHAT,
// …other models
];
export const HIGHLIGHTED_MODELS = [
GPT_OSS_20B,
+ GPT_5_NANO,
GPT_5_MINI,
GPT_5_CHAT,
// …other highlighted models
];
export const FREE_MODELS = [
// …other free models
+ GPT_5_NANO,
];
export const MODEL_DETAILS = {
[GPT_OSS_20B]: {
displayName: "GPT-OSS 20B",
reasoning: true,
},
+ [GPT_5_NANO]: {
+ displayName: "GPT-5-nano",
+ reasoning: false,
+ },
[GPT_5_MINI]: {
displayName: "GPT-5-mini",
reasoning: false,
},
[GPT_5_CHAT]: {
displayName: "GPT-5-chat",
reasoning: true,
},
// …other model entries
};
🤖 Prompt for AI Agents
In src/lib/common/ai/models.ts around lines 18 to 20, GPT_5_NANO is declared but
not included in the exported arrays or MODEL_DETAILS; add GPT_5_NANO to the
MODELS array and to any arrays that list available/featured/free models (MODELS,
HIGHLIGHTED_MODELS, FREE_MODELS) consistent with where similar GPT_5_* entries
appear, and add a corresponding entry to MODEL_DETAILS using the same object
shape as the other GPT_5 entries (id/value set to GPT_5_NANO, a human-friendly
name like "GPT-5 Nano", and any family/metadata fields matching the convention
used by GPT_5_MINI/CHAT).

input.message,
context.inferenceContext.key,
input.model.endsWith(":free") ? LLAMA_3_3_70B_FREE : GPT_4_1_NANO,
input.model.endsWith(":free") ? LLAMA_3_3_70B_FREE : GPT_5_NANO,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Verify GPT_5_NANO configuration.

The chat title generation now uses GPT_5_NANO for non-free models. However, based on the models file review, GPT_5_NANO is defined but not included in the MODELS, HIGHLIGHTED_MODELS, or FREE_MODELS arrays, and has no entry in MODEL_DETAILS.


🏁 Script executed:

#!/bin/bash
# Verify GPT_5_NANO is properly configured across the codebase
echo "Checking GPT_5_NANO usage and configuration..."

# Check if GPT_5_NANO is in MODELS array
rg -A 5 -B 5 "GPT_5_NANO" src/lib/common/ai/models.ts

# Check for any model features entry
rg -A 10 -B 2 "gpt-5-nano" src/lib/common/ai/modelFeatures.ts

Length of output: 677


This will confirm whether GPT_5_NANO has been added to the main model arrays and if there’s a corresponding MODEL_DETAILS entry.


🏁 Script executed:

#!/bin/bash
set -e
echo "Checking array definitions in models.ts for GPT_5_NANO inclusion..."

# Inspect the MODELS array
rg -A5 -B1 "export const MODELS" src/lib/common/ai/models.ts

# Inspect the HIGHLIGHTED_MODELS array
rg -A5 -B1 "export const HIGHLIGHTED_MODELS" src/lib/common/ai/models.ts

# Inspect the FREE_MODELS array
rg -A5 -B1 "export const FREE_MODELS" src/lib/common/ai/models.ts

echo
echo "Searching for MODEL_DETAILS definitions and entries across ai directory..."
rg -n "MODEL_DETAILS" -R src/lib/common/ai

Length of output: 1297


🏁 Script executed:

#!/bin/bash
set -e
echo "==== Full MODELS array ===="
awk '/export const MODELS/,/\];/' src/lib/common/ai/models.ts || true

echo
echo "==== Full HIGHLIGHTED_MODELS array ===="
awk '/export const HIGHLIGHTED_MODELS/,/\];/' src/lib/common/ai/models.ts || true

echo
echo "==== Full FREE_MODELS array ===="
awk '/export const FREE_MODELS/,/\];/' src/lib/common/ai/models.ts || true

echo
echo "==== Locate MODEL_DETAILS file(s) ===="
rg -l "MODEL_DETAILS" -g "*.ts" src/lib/common/ai || true

echo
echo "==== MODEL_DETAILS contents (if found) ===="
# Attempt to print MODEL_DETAILS object from likely file
for file in $(rg -l "export const MODEL_DETAILS" -g "*.ts" src/lib/common/ai); do
  echo "---- $file ----"
  awk '/export const MODEL_DETAILS/,/};/' "$file" || true
done

Length of output: 6610


Missing GPT_5_NANO registration

The chat title logic now falls back to GPT_5_NANO for non-free models, but that model isn’t registered in our central model lists or details. Please add GPT_5_NANO to:

  • MODELS in src/lib/common/ai/models.ts
  • (Optionally) HIGHLIGHTED_MODELS if it should appear in the UI carousel
  • MODEL_DETAILS with a display name and reasoning flag

Locations to update:

  • File: src/lib/common/ai/models.ts
    • Under export const MODELS = [...]
    • Under export const HIGHLIGHTED_MODELS = [...] (if desired)
  • File: src/lib/common/ai/models.ts
    • Inside export const MODEL_DETAILS: Record<ModelId, ModelDetails> = { ... }

Example diff:

--- a/src/lib/common/ai/models.ts
@@ export const MODELS = [
   GPT_5_CHAT,
+  GPT_5_NANO,
@@ export const HIGHLIGHTED_MODELS = [
   GPT_5_CHAT,
+  GPT_5_NANO,
@@ export const MODEL_DETAILS: Record<ModelId, ModelDetails> = {
   [GPT_5_CHAT]: {
     displayName: "GPT-5-chat",
     reasoning: false,
   },
+  [GPT_5_NANO]: {
+    displayName: "GPT-5-nano",
+    reasoning: false,
+  },
🤖 Prompt for AI Agents
In src/lib/common/ai/models.ts (update the arrays and map where MODELS,
HIGHLIGHTED_MODELS, and MODEL_DETAILS are declared), add a new entry for
GPT_5_NANO: include its id in the exported MODELS array, optionally include it
in HIGHLIGHTED_MODELS if you want it shown in the UI carousel, and add a
MODEL_DETAILS entry keyed by the GPT_5_NANO id with a human-friendly displayName
(e.g., "GPT-5 Nano") and the appropriate reasoning flag (true/false) and any
other required fields to match the ModelDetails shape; ensure imports/types
still validate and run type checks after adding the entries.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants