Skip to content

1.5 - #3167

Closed
ahmczsy wants to merge 9 commits into
QuantumNous:mainfrom
autokernel-sz:1.5
Closed

1.5#3167
ahmczsy wants to merge 9 commits into
QuantumNous:mainfrom
autokernel-sz:1.5

Conversation

@ahmczsy

@ahmczsy ahmczsy commented Mar 7, 2026

Copy link
Copy Markdown

Summary by CodeRabbit

  • Bug Fixes

    • Fixed model name inconsistencies in streaming and standard responses across Claude and OpenAI API integrations.
    • Updated error message references for improved clarity.
  • Chores

    • Updated Docker image registry configuration.

@coderabbitai

coderabbitai Bot commented Mar 7, 2026

Copy link
Copy Markdown
Contributor

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: fd0aa5ef-3dbc-4784-adf5-2dfe52b9c4cb

📥 Commits

Reviewing files that changed from the base of the PR and between c706a5c and 51f8a8b.

📒 Files selected for processing (7)
  • .github/workflows/docker-image-arm64.yml
  • dto/claude.go
  • dto/error.go
  • dto/openai_response.go
  • relay/channel/claude/relay-claude.go
  • relay/channel/openai/relay-openai.go
  • relay/channel/openai/relay_responses.go

Walkthrough

The changes introduce model rewriting logic across Claude and OpenAI relay handlers to normalize model names in responses, add error message sanitization, update CI/CD Docker image references from calciumion/new-api to ahmczsy/new-api, and provide utility methods for model field management in DTO types.

Changes

Cohort / File(s) Summary
CI/CD Docker Configuration
.github/workflows/docker-image-arm64.yml
Updated Docker image references from calciumion/new-api to ahmczsy/new-api across tagging and manifest steps; removed push-on-push trigger, relying on manual workflow_dispatch for tag input.
DTO Models and Utilities
dto/claude.go, dto/error.go, dto/openai_response.go
Added ResetModel() method to ClaudeResponse, NeedResetModel() method to ResponsesStreamResponse, and error message sanitization replacing "Anthropic" with "KernelCat" in TryToOpenAIError().
Claude Relay Handler
relay/channel/claude/relay-claude.go
Added resetModel() and resetMessageStartData() helpers to rewrite model fields in Claude-format responses and message payloads, ensuring downstream handlers use the origin model; integrated resets into streaming and response processing paths.
OpenAI Relay Handlers
relay/channel/openai/relay-openai.go, relay/channel/openai/relay_responses.go
Added three helper functions (resetModel(), resetStreamModel(), resetResponseStreamModel()) to update model fields in JSON payloads; integrated resets into standard and streaming response handling to normalize model names with info.OriginModelName.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • seefs001
  • Calcium-Ion

Poem

🐰 Hoppy hops through model fields so bright,
Rewriting names from left to right,
Claude and OpenAI in perfect sync,
No more confusion—what a wink!

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


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.

@ahmczsy ahmczsy closed this Mar 7, 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.

1 participant