Fix [object Object] serialization issue with multi-modal content#11
Open
kevinfealey wants to merge 2 commits intoatalovesyou:mainfrom
Open
Fix [object Object] serialization issue with multi-modal content#11kevinfealey wants to merge 2 commits intoatalovesyou:mainfrom
kevinfealey wants to merge 2 commits intoatalovesyou:mainfrom
Conversation
- Handle OpenAI multi-modal content format where content can be an array
of content parts (e.g., [{"type": "text", "text": "Hello"}]) in addition
to plain strings
- Add defensive string coercion in response handlers to prevent
[object Object] appearing when unexpected types are encountered
- Update OpenAI types to properly reflect that content can be string
or array format per OpenAI API spec
- Add debug logging for request diagnostics
Fixes issue atalovesyou#2 in upstream repo where Clawdbot integration showed
[object Object] instead of actual message content.
Provides tested configuration for integrating with OpenClaw including provider setup, model definitions, and agent defaults. Addresses user confusion reported in upstream issue atalovesyou#2.
bwiedmann
added a commit
to bwiedmann/claude-max-api-proxy
that referenced
this pull request
Feb 15, 2026
…ssue with multi-modal content # Conflicts: # src/adapter/openai-to-cli.ts # src/types/openai.ts
3 tasks
Grivn
added a commit
to mnemon-dev/claude-max-api-proxy
that referenced
this pull request
Feb 20, 2026
Fixes applied (from upstream PRs atalovesyou#7, atalovesyou#11, atalovesyou#12, atalovesyou#13, atalovesyou#17, atalovesyou#20): - fix: normalizeModelName crash on undefined model (issue atalovesyou#21) - fix: [object Object] serialization for array content parts - fix: E2BIG error by passing prompt via stdin instead of CLI arg - fix: ensureString on result.result to prevent non-string output - feat: CLAUDE_DANGEROUSLY_SKIP_PERMISSIONS env var for headless mode - feat: OPENCLAW_PROXY=1 env injection for hook isolation - feat: model aliases for claude-*-4-5, claude-*-4-6 generations - feat: claude-proxy/ provider prefix support - feat: developer role support in message conversion - perf: increase subprocess timeout from 5min to 15min Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes issue #2 in upstream repo where Clawdbot integration showed [object Object] instead of actual message content.