coder / coder/aisdk-go

bug: aisdk.MessagesToOpenAI ignores the Content field

Open
#10 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
41
Forks
9
PR merge metrics
No merged PRs in 30d

Description

If you run:

```
aisdk.MessagesToOpenAI([]aisdk.Message{
{
Role: "user",
Content: "Hello, how are you?",
},
})
```

you'll get out a message with no content.

https://github.com/coder/aisdk-go/blob/5a038b91ecee3d1ad93a0ef8976a50db4f84da20/openai.go#L47

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in openai.go at the linked line 47 and trace how aisdk.MessagesToOpenAI converts the provided aisdk.Message. Reproduce the example from the issue, then verify that the resulting OpenAI message preserves the Content field instead of being empty.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.