components/model/openai: build fails on Go 1.26 with sonic v1.14.1 (undefined: GoMapIterator)

Open Beginner friendly
#997 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
go

Research direction

Start with the OpenAI model component's go.mod and inspect the sonic requirement, then reproduce the clean-install build on go1.26.7 windows/amd64. Confirm that the dependency floor resolves the reported GoMapIterator failure and that NewChatModel plus Generate still works against an OpenAI-compatible endpoint.

Written by the indexing model from the issue text.

Description

A clean install of the OpenAI model component fails to build on go1.26.7 windows/amd64:

$ go mod init example && go get github.com/cloudwego/eino-ext/components/model/openai
$ go build ./...
# github.com/bytedance/sonic/internal/rt
…/sonic@v1.14.1/internal/rt/stubs.go:33:22: undefined: GoMapIterator
…/sonic@v1.14.1/internal/rt/stubs.go:36:54: undefined: GoMapIterator

go get resolves github.com/bytedance/sonic v1.14.1, and GoMapIterator is a runtime-internal symbol that is no longer available to it on Go 1.26. Nothing in Eino's own code is involved.

Workaround

go get github.com/bytedance/sonic@latest   # v1.14.1 → v1.15.4

After that the build succeeds and the component works — I ran a NewChatModel + Generate against an OpenAI-compatible endpoint with no further changes.

Why it might be worth a version floor

The compiler error names sonic, not Eino, so someone whose first contact with the project is go get …/components/model/openai on a current toolchain hits a wall that reads as unrelated to what they just installed. Bumping the minimum sonic version in go.mod would turn a confusing build failure into a resolved dependency.

Happy to open a PR for the go.mod bump if that is useful — I have not sent one because I do not know whether a newer sonic breaks anything else you support.

Dominant language
Go
Stars
813
Forks
368
Avg merge
18h
Merged PRs (30d)
11

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from cloudwego/eino-ext

All issues in cloudwego/eino-ext

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.