openclaw - 💡(How to fix) Fix Custom Provider volcengine-plan Fails with TypeError: Unexpected Keyword Argument 'provider_id' [1 comments, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#60492Fetched 2026-04-08 02:50:27
View on GitHub
Comments
1
Participants
1
Timeline
3
Reactions
0
Author
Participants
Timeline (top)
closed ×1commented ×1locked ×1

Error Message

TypeError: AsyncCompletions.create() got an unexpected keyword argument 'provider_id'

Root Cause

🔍 Root Cause

Fix Action

Fix / Workaround

AspectDetails
Severity🔴 High - Complete block of provider usage
Affected UsersAll users using volcengine-plan provider
WorkaroundManual config edit (remove provider_id from generate_kwargs)
Data LossNone
SecurityNone

Code Example

TypeError: AsyncCompletions.create() got an unexpected keyword argument 'provider_id'

---

{
  "id": "volcengine-plan",
  "base_url": "https://ark.cn-beijing.volces.com/api/coding/v3",
  "api_key": "...",
  "chat_model": "OpenAIChatModel",
  "generate_kwargs": {
    "provider_id": "volcengine-plan",  // ❌ BUG: Invalid parameter
    "model": "glm-4.7",
    "scope": "chat"
  }
}

---

// Before (❌ Buggy)
"generate_kwargs": {
  "provider_id": "volcengine-plan",
  "model": "glm-4.7",
  "scope": "chat"
}

// After (✅ Fixed)
"generate_kwargs": {
  "model": "glm-4.7",
  "scope": "chat"
}

---

curl -X POST "https://ark.cn-beijing.volces.com/api/coding/v3/chat/completions" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{"model":"Doubao-Seed-2.0-Code","messages":[{"role":"user","content":"test"}]}'
# ✅ Returns successful response

---

# Any LLM call through volcengine-plan provider
# ❌ TypeError: AsyncCompletions.create() got an unexpected keyword argument 'provider_id'
RAW_BUFFERClick to expand / collapse

🐛 Bug Description

When using the custom provider volcengine-plan (Volcano Engine Coding Plan / Doubao models) to make LLM calls, the system throws a TypeError that completely blocks usage:

TypeError: AsyncCompletions.create() got an unexpected keyword argument 'provider_id'

🔍 Root Cause

The custom provider configuration template incorrectly includes provider_id in the generate_kwargs section, which is then passed directly to the OpenAI SDK's chat.completions.create() method. However, provider_id is not a valid OpenAI SDK parameter.

Problematic Configuration (/root/.copaw.secret/providers/custom/volcengine-plan.json):

{
  "id": "volcengine-plan",
  "base_url": "https://ark.cn-beijing.volces.com/api/coding/v3",
  "api_key": "...",
  "chat_model": "OpenAIChatModel",
  "generate_kwargs": {
    "provider_id": "volcengine-plan",  // ❌ BUG: Invalid parameter
    "model": "glm-4.7",
    "scope": "chat"
  }
}

📝 Steps to Reproduce

  1. Create custom provider config at /root/.copaw.secret/providers/custom/volcengine-plan.json
  2. Include provider_id in generate_kwargs (as shown above)
  3. Set provider as active in agent.json
  4. Attempt to make any LLM call
  5. Result: TypeError exception

✅ Expected Behavior

  • Custom providers should work without manual configuration edits
  • provider_id should be handled internally by CoPaw (top-level "id" field)
  • Only valid OpenAI SDK parameters should be in generate_kwargs

🔧 Proposed Fix

Remove provider_id from generate_kwargs:

// Before (❌ Buggy)
"generate_kwargs": {
  "provider_id": "volcengine-plan",
  "model": "glm-4.7",
  "scope": "chat"
}

// After (✅ Fixed)
"generate_kwargs": {
  "model": "glm-4.7",
  "scope": "chat"
}

🧪 Verification

API Test (works independently):

curl -X POST "https://ark.cn-beijing.volces.com/api/coding/v3/chat/completions" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{"model":"Doubao-Seed-2.0-Code","messages":[{"role":"user","content":"test"}]}'
# ✅ Returns successful response

CoPaw Integration (fails):

# Any LLM call through volcengine-plan provider
# ❌ TypeError: AsyncCompletions.create() got an unexpected keyword argument 'provider_id'

📊 Impact

AspectDetails
Severity🔴 High - Complete block of provider usage
Affected UsersAll users using volcengine-plan provider
WorkaroundManual config edit (remove provider_id from generate_kwargs)
Data LossNone
SecurityNone

💡 Recommendations

  1. Fix configuration template for volcengine-plan provider
  2. Add validation to prevent invalid parameters in generate_kwargs
  3. Audit other custom providers for the same issue
  4. Document correct configuration format
  5. Add schema validation for provider configurations

📎 System Information

  • OS: Linux 6.8.0-106-generic (Ubuntu)
  • Python: 3.12.3
  • CoPaw Version: 1.0.0.post3
  • Provider: volcengine-plan (Volcano Engine / Doubao)
  • Models: Doubao-Seed-2.0-Code, glm-4.7, kimi-k2.5
  • Date: 2026-04-03

🏷️ Labels

  • bug
  • configuration
  • provider-integration
  • volcengine
  • high-severity

Please fix this configuration bug to enable volcengine-plan provider usage. 🙏

extent analysis

TL;DR

Remove the provider_id from the generate_kwargs section in the custom provider configuration template to fix the TypeError.

Guidance

  • Identify the custom provider configuration file (/root/.copaw.secret/providers/custom/volcengine-plan.json) and edit it to remove the provider_id from generate_kwargs.
  • Verify that the fix works by making an LLM call through the volcengine-plan provider after updating the configuration.
  • Consider auditing other custom providers for similar issues to prevent future errors.
  • Add validation to prevent invalid parameters in generate_kwargs to avoid similar issues in the future.

Example

The corrected generate_kwargs section should look like this:

"generate_kwargs": {
  "model": "glm-4.7",
  "scope": "chat"
}

Notes

This fix assumes that the provider_id is not required for the OpenAI SDK's chat.completions.create() method. If the provider_id is required, it may need to be handled internally by CoPaw or passed in a different way.

Recommendation

Apply the workaround by removing the provider_id from the generate_kwargs section, as this is a direct fix for the identified issue and does not introduce any new complexity or potential issues.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING