Skip to content

feat(ai): openai gpt-5.5 chat support#4012

Merged
ehayes2000 merged 1 commit into
mainfrom
add-openai-models
Jun 15, 2026
Merged

feat(ai): openai gpt-5.5 chat support#4012
ehayes2000 merged 1 commit into
mainfrom
add-openai-models

Conversation

@ehayes2000

Copy link
Copy Markdown
Contributor

No description provided.

@github-actions

github-actions Bot commented Jun 11, 2026

Copy link
Copy Markdown

@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Added support for GPT-5.5 and GPT-5 Mini language models from OpenAI
    • Expanded to support both OpenAI and Anthropic as available AI provider options
  • Improvements

    • Enhanced tool schema processing for better compatibility across tool integrations

Walkthrough

This PR adds two new OpenAI models — GPT-5.5 and GPT-5 Mini — to the agent stack. On the Rust side, a new ModelProvider enum is introduced alongside new AgentModel variants; AgentLoop is refactored from an Anthropic-only implementation into a provider-dispatching loop that stores an optional OpenAI client and selects agents at session creation time. The AnthropicModel wrapper module is removed. Tool request schemas are now normalized (ensuring object schemas have a properties key) to satisfy OpenAI's Responses API, and a new binary generates a snapshot of these schemas. Tool call ID replay is updated to prefix item ids with fc_ and wire call_id through for OpenAI compatibility. The new models are also registered in the document cognition service, two OpenAPI specs, and frontend display/icon mappings.

🚥 Pre-merge checks | ✅ 3 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive No description was provided by the author, making it impossible to assess whether it relates to the changeset. Add a pull request description explaining the changes, such as the addition of OpenAI GPT-5.5 and GPT-5 mini model support and any implementation details.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title follows conventional commits format with 'feat:' prefix and is well under 72 characters, directly summarizing the main change of adding OpenAI GPT-5.5 and GPT-5 mini model support.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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

Comment @coderabbitai help to get the list of available commands and usage tips.

@ehayes2000 ehayes2000 force-pushed the add-openai-models branch 2 times, most recently from 4193afb to 1531e33 Compare June 11, 2026 21:40
@ehayes2000 ehayes2000 force-pushed the tool-transforms branch 2 times, most recently from ae95a9e to d20f9a9 Compare June 15, 2026 19:27
Base automatically changed from tool-transforms to main June 15, 2026 19:40
- agent: route Gpt5_5/Gpt5Mini through rig's OpenAI Responses API with
  reasoning params, non-strict tools, and provider-aware model selection
- depend on macro-inc/rig fork (upstream main + with_non_strict_tools())
  until the patch lands upstream
- persist/replay tool calls with call_id so OpenAI conversations survive
  the DB round-trip (fc_-prefixed item ids, verified against live API)
- re-enable ListEntities now that non-strict mode sends its schema verbatim
- frontend: model picker entries + generated schemas for the new models

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
rust/cloud-storage/agent/src/agent_loop.rs (1)

178-178: ⚡ Quick win

Add err to tracing::instrument for Result-returning function.

Per coding guidelines, tracing::instrument should include err when the function returns Result.

Suggested fix
-    #[tracing::instrument(name = "invoke_agent", skip_all)]
+    #[tracing::instrument(name = "invoke_agent", skip_all, err)]
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@rust/cloud-storage/agent/src/agent_loop.rs` at line 178, The
tracing::instrument macro decorator on the invoke_agent function is missing the
err parameter. According to coding guidelines, when a function returns Result,
the tracing::instrument attribute must include err to enable automatic error
logging. Add err as an additional parameter to the existing tracing::instrument
macro on the invoke_agent function, keeping the existing name and skip_all
parameters.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@rust/cloud-storage/ai_tools/src/bin/gen_ai_request_schemas.rs`:
- Around line 42-44: The condition checking for `Some(parent)` from
`std::path::Path::new(&out_path).parent()` does not guard against empty parent
paths. When the output path is just a filename (e.g., `out.json`), the parent
exists but is empty, and calling `create_dir_all` on an empty path will error.
Add an additional check inside the existing `if let Some(parent)` block to
verify the parent path is not empty before calling `create_dir_all(parent)`.
This can be done by checking if the parent path has any components or is not
equal to an empty path.

---

Nitpick comments:
In `@rust/cloud-storage/agent/src/agent_loop.rs`:
- Line 178: The tracing::instrument macro decorator on the invoke_agent function
is missing the err parameter. According to coding guidelines, when a function
returns Result, the tracing::instrument attribute must include err to enable
automatic error logging. Add err as an additional parameter to the existing
tracing::instrument macro on the invoke_agent function, keeping the existing
name and skip_all parameters.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: f49b2f33-783f-45a2-ab6e-040bab4b50a0

📥 Commits

Reviewing files that changed from the base of the PR and between bdb8d51 and 19a406e.

⛔ Files ignored due to path filters (5)
  • js/app/packages/core/component/AI/assets/openai.svg is excluded by !**/*.svg
  • js/app/packages/service-clients/service-cognition/generated/schemas/agentModel.ts is excluded by !**/generated/**
  • js/app/packages/service-clients/service-cognition/generated/schemas/model.ts is excluded by !**/generated/**
  • js/app/packages/service-clients/service-scheduled-action/generated/schemas/agentModel.ts is excluded by !**/generated/**
  • rust/cloud-storage/Cargo.lock is excluded by !**/*.lock, !**/Cargo.lock
📒 Files selected for processing (18)
  • js/app/packages/core/component/AI/constant/model.ts
  • js/app/packages/service-clients/service-cognition/openapi.json
  • js/app/packages/service-clients/service-scheduled-action/openapi.json
  • rust/cloud-storage/agent/Cargo.toml
  • rust/cloud-storage/agent/src/agent_loop.rs
  • rust/cloud-storage/agent/src/anthropic_model.rs
  • rust/cloud-storage/agent/src/anthropic_model/test.rs
  • rust/cloud-storage/agent/src/completion.rs
  • rust/cloud-storage/agent/src/convert.rs
  • rust/cloud-storage/agent/src/convert/test.rs
  • rust/cloud-storage/agent/src/lib.rs
  • rust/cloud-storage/agent/src/model.rs
  • rust/cloud-storage/agent/src/model/test.rs
  • rust/cloud-storage/agent/src/tool_adapter.rs
  • rust/cloud-storage/agent/src/tool_adapter/test.rs
  • rust/cloud-storage/ai_tools/src/bin/gen_ai_request_schemas.rs
  • rust/cloud-storage/document_cognition_service/src/core/model.rs
  • rust/cloud-storage/document_cognition_service/src/models_bin.rs
💤 Files with no reviewable changes (2)
  • rust/cloud-storage/agent/src/anthropic_model/test.rs
  • rust/cloud-storage/agent/src/anthropic_model.rs

Comment on lines +42 to +44
if let Some(parent) = std::path::Path::new(&out_path).parent() {
std::fs::create_dir_all(parent).expect("create output dir");
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Guard empty parent paths before create_dir_all.

Line 42-44 can fail for filename-only outputs (e.g., gen_ai_request_schemas out.json) because parent() may be empty, and create_dir_all("") errors. Skip directory creation when the parent path is empty.

Proposed fix
-    if let Some(parent) = std::path::Path::new(&out_path).parent() {
-        std::fs::create_dir_all(parent).expect("create output dir");
+    if let Some(parent) = std::path::Path::new(&out_path).parent() {
+        if !parent.as_os_str().is_empty() {
+            std::fs::create_dir_all(parent).expect("create output dir");
+        }
     }
📝 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
if let Some(parent) = std::path::Path::new(&out_path).parent() {
std::fs::create_dir_all(parent).expect("create output dir");
}
if let Some(parent) = std::path::Path::new(&out_path).parent() {
if !parent.as_os_str().is_empty() {
std::fs::create_dir_all(parent).expect("create output dir");
}
}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@rust/cloud-storage/ai_tools/src/bin/gen_ai_request_schemas.rs` around lines
42 - 44, The condition checking for `Some(parent)` from
`std::path::Path::new(&out_path).parent()` does not guard against empty parent
paths. When the output path is just a filename (e.g., `out.json`), the parent
exists but is empty, and calling `create_dir_all` on an empty path will error.
Add an additional check inside the existing `if let Some(parent)` block to
verify the parent path is not empty before calling `create_dir_all(parent)`.
This can be done by checking if the parent path has any components or is not
equal to an empty path.

@ehayes2000 ehayes2000 merged commit ec2ed7f into main Jun 15, 2026
26 checks passed
@ehayes2000 ehayes2000 deleted the add-openai-models branch June 15, 2026 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant