Skip to content

fix: claude request missing field - #2304

Merged
Calcium-Ion merged 1 commit into
QuantumNous:mainfrom
seefs001:fix/claude-missing-field
Nov 30, 2025
Merged

fix: claude request missing field#2304
Calcium-Ion merged 1 commit into
QuantumNous:mainfrom
seefs001:fix/claude-missing-field

Conversation

@seefs001

@seefs001 seefs001 commented Nov 25, 2025

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • New Features
    • Extended API request configuration with customizable output settings
    • Added support for flexible output format options
    • Introduced container configuration capabilities for enhanced deployment flexibility

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai

coderabbitai Bot commented Nov 25, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

Three new optional fields were added to the ClaudeRequest struct in dto/claude.go: OutputConfig, OutputFormat, and Container. These fields use json.RawMessage type with omitempty tags, allowing flexible JSON payload handling without modifying existing functionality.

Changes

Cohort / File(s) Change Summary
ClaudeRequest struct expansion
dto/claude.go
Added three new optional fields: OutputConfig, OutputFormat, and Container (all json.RawMessage with omitempty tags)

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

  • Straightforward struct field additions with consistent formatting
  • No logic modifications or behavioral changes
  • Standard JSON serialization tags applied uniformly

Poem

🐰 Three fields hop into place,
OutputConfig, Format, Container grace,
JSON whispers omitempty true,
The rabbit's struct springs anew!

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix: claude request missing field' accurately describes the main change—adding missing fields to the ClaudeRequest struct.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

📝 Customizable high-level summaries are now available in beta!

You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. 📝 Description — Summarize the main change in 50–60 words, explaining what was done.
  2. 📓 References — List relevant issues, discussions, documentation, or related PRs.
  3. 📦 Dependencies & Requirements — Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. 📊 Contributor Summary — Include a Markdown table showing contributions:
    | Contributor | Lines Added | Lines Removed | Files Changed |
  5. ✔️ Additional Notes — Add any extra reviewer context.
    Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.


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.

@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: 0

🧹 Nitpick comments (1)
dto/claude.go (1)

206-208: Add documentation for the new public fields to align with Go conventions.

These three new fields (OutputConfig, OutputFormat, Container) correspond to Claude API request parameters for structured outputs and container configuration. While OutputFormat is already used in relay/channel/replicate/adaptor.go, all three fields lack documentation comments explaining their purpose—this should be added for maintainability of public struct fields.

Apply this diff:

+	// OutputConfig specifies configuration for structured outputs behavior in Claude API requests
 	OutputConfig      json.RawMessage `json:"output_config,omitempty"`
+	// OutputFormat specifies the structured output format (e.g., JSON schema) for Claude API responses
 	OutputFormat      json.RawMessage `json:"output_format,omitempty"`
+	// Container specifies container or sandbox configuration for code execution in Claude API requests
 	Container         json.RawMessage `json:"container,omitempty"`
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a6a20a2 and dab5fad.

📒 Files selected for processing (1)
  • dto/claude.go (1 hunks)

@Calcium-Ion
Calcium-Ion merged commit c07331e into QuantumNous:main Nov 30, 2025
1 check passed
@coderabbitai coderabbitai Bot mentioned this pull request Feb 6, 2026
ennnnny pushed a commit to ennnnny/new-api that referenced this pull request Mar 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants