Skip to content

Response format incompatible with Clawdbot's OpenAI provider #2

@gebeer

Description

@gebeer

Context

Attempted to use this proxy with Clawdbot as documented in Clawdbot's docs (docs/providers/claude-max-api-proxy.md). The README here suggests Clawdbot users should use native OAuth instead, but Clawdbot's docs provide a proxy config example.

Configuration Used

{
  "env": {
    "OPENAI_API_KEY": "not-needed",
    "OPENAI_BASE_URL": "http://localhost:3456/v1"
  },
  "models": {
    "providers": {
      "openai": {
        "baseUrl": "http://localhost:3456/v1",
        "api": "openai-completions",
        "models": [
          { "id": "claude-opus-4", "name": "Claude Opus 4", "reasoning": true }
        ]
      }
    }
  },
  "agents": {
    "defaults": {
      "model": { "primary": "openai/claude-opus-4" }
    }
  }
}

Observed Behavior

  1. Proxy health check: ✅ OK
  2. /v1/models endpoint: ✅ Returns expected model list
  3. Chat completion request: ❌ Response received but content is [object Object]

Clawdbot replied with:

"I notice your messages appear to be showing [object Object] which typically indicates a serialization issue..."

Expected Behavior

Response content should be a properly serialized string, not a JS object reference.

Likely Cause

The cli-to-openai.ts adapter may be returning an object where a string is expected in the response content field, or the SSE stream chunks aren't being serialized properly.

Suggestion

Either:

  1. Add tested Clawdbot integration config to this README (and verify it works)
  2. Or clarify in README that Clawdbot users should use native OAuth (and coordinate with Clawdbot docs to remove/update the proxy guide)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions