Skip to content

Custom OpenAI-compatible provider: "Expected 'function.name' to be a string" on linux, not windows #31295

Closed as duplicate

Description

@SunYong0821

Description

Custom OpenAI-compatible provider: "Expected 'function.name' to be a string" on linux, not windows

The same opencode version works fine on Windows 11, but reports an error on Linux. Why is that?

Plugins

none

OpenCode version

1.16.2

Steps to reproduce

{
"$schema": "https://opencode.ai/config.json",
"share": "disabled",
"experimental": {
"openTelemetry": false
},
"provider": {
"vllm-q": {
"name": "vllm serve",
"npm": "@ai-sdk/openai-compatible",
"options": {
"baseURL": "http://localhost:9999/v1"
},
"models": {
"qwen3.6-27b-int4": {
"name": "qwen3.6-27b-int4"
}
}
},
"vllm": {
"name": "vllm serve",
"npm": "@ai-sdk/openai-compatible",
"options": {
"baseURL": "http://localhost:8888/v1"
},
"models": {
"qwen3.6-27b": {
"name": "qwen3.6-27b"
}
}
}
}
}

The configuration is the same on Windows and Linux.

Screenshot and/or share link

No response

Operating System

ubuntu 24.04 and windows 11

Terminal

xshell and vscode

Activity

  1. github-actions commented on Jun 8, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    If your issue is the same underlying problem, please add any additional context (e.g., whether your vLLM version differs, or whether the Linux vs Windows behavior difference is the new angle) to that existing issue rather than opening a new one.

  2. rekram1-node commented on Jun 8, 2026

    @rekram1-node
    Collaborator

    AUTOMATED: closing as duplicate of: #26412

  3. nazerim commented on Oct 1, 2026

    @nazerim

    Still reproducible on 1.18.34. Root cause confirmed by grepping published tarballs: the throw string Expected 'function.name' ships in @ai-sdk/openai-compatible up to 2.0.7 and is gone from 3.0.0 onward (vercel/ai#18440 / PR #18445 fixed it upstream) — but opencode's compiled binary still bundles a pre-3.0.0 copy, so every closed tracker reads "fixed/not-ours" while users keep hitting it.

    Filed with evidence + a deterministic synthetic-SSE reproduction (no real API key needed): #52462

    Interim fix (MIT, plugin-only, no core changes): https://github.com/nazerim/toolcall-guard — repairs/buffers malformed tool_calls deltas at the fetch layer, scrubs replayed ChatML tokens from outbound history (they re-arm the provider's parser every turn), and auto-continues turns the provider silently truncates at a clean finish_reason:"stop".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions