Bumps the all group with 1 update in the / directory: [google.golang.org/genai](https://github.com/googleapis/go-genai).
Updates `google.golang.org/genai` from 1.55.0 to 1.56.0
- [Release notes](https://github.com/googleapis/go-genai/releases)
- [Changelog](https://github.com/googleapis/go-genai/blob/main/CHANGELOG.md)
- [Commits](https://github.com/googleapis/go-genai/compare/v1.55.0...v1.56.0)
---
updated-dependencies:
- dependency-name: google.golang.org/genai
dependency-version: 1.56.0
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: all
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
dependabot[bot]
and
dependabot[bot]
created
d9d0f63
chore(deps): bump github.com/ardanlabs/kronk in the kronk group (#231)
Click to expand commit body
Bumps the kronk group with 1 update: [github.com/ardanlabs/kronk](https://github.com/ardanlabs/kronk).
Updates `github.com/ardanlabs/kronk` from 1.24.2 to 1.25.0
- [Release notes](https://github.com/ardanlabs/kronk/releases)
- [Commits](https://github.com/ardanlabs/kronk/compare/v1.24.2...v1.25.0)
---
updated-dependencies:
- dependency-name: github.com/ardanlabs/kronk
dependency-version: 1.25.0
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: kronk
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
c954320
chore: update go patch version to make govulncheck happy
Andrey Nering
created
e0ddf87
fix(openai): yield tool calls with invalid JSON instead of silently dropping (#223)
Click to expand commit body
Previously, tool calls with invalid JSON arguments were silently dropped
in the stream, preventing the agent from reporting the error back to the
model. Now all tool calls are yielded regardless of argument validity,
and the agent handles validation via its existing repair/error flow.
Additionally, track hasYieldedToolCall to map finishReason correctly:
use tool_calls only when a tool call was actually yielded, and fall back
to stop when no tool call was yielded despite the API saying tool_calls.
mkaaad
created
ba2ee05
fix: guard against nil response in Generate to prevent panic (#228)
Click to expand commit body
Some OpenAI-compatible API endpoints (e.g. DeepSeek) may return a nil
response with no error from the underlying SDK under edge conditions
(empty response body, connection issues during response parsing, etc.).
When this happens, accessing response.Choices (Chat Completions),
response.Error (Responses API), or response.Content (Anthropic)
causes a nil pointer dereference panic that crashes the process.
Add nil response checks in Generate methods for:
- providers/openai: languageModel.Generate (Chat Completions API)
- providers/openai: responsesLanguageModel.Generate (Responses API)
- providers/anthropic: languageModel.Generate
Each returns a descriptive fantasy.Error instead of panicking.
Co-authored-by: liaoyijun <“liaoyijun@wps.cn”>
792d186
feat: add `ExtraBody` provider option to openai-compat (#220)
Click to expand commit body
This was already present to some other providers, like Vercel and
OpenRouter.
Andrey Nering
created
ea8f291
fix(openai): handle media tool results (#221)
Click to expand commit body
This fix applies to media tool results for every downstream provider
that builds on `providers/openai` (Hyper, OpenRouter, Vercel, MiniMax,
Copilot, Azure, `openai-compat`).
Tool results with image or audio content fell through the
MessageRoleTool switch in both the Chat Completions and Responses
paths, leaving a dangling `tool_call` with no matching tool message and
400-ing every subsequent turn. This fix emit a text tool message with
a placeholder so the pairing stays valid, then attaches the media in
a synthetic follow-up user message so vision and audio-capable models
still see it. It will also warn on unknown tool result content types so
new variants can't silently drop messages again.
966aa60
feat(agent): add `ToolChoice` to `AgentCall`, `AgentStreamCall`, and `WithToolChoice` option (#213)
Click to expand commit body
Previously ToolChoice could only be set via PrepareStep. Expose it as a
first-class field on AgentCall/AgentStreamCall and a WithToolChoice agent
option, mirroring how Temperature, TopP, and other call params are surfaced.
Precedence: PrepareStep > call.ToolChoice > WithToolChoice > ToolChoiceAuto.
Co-authored-by: wangfeng01 <wangfeng01@genora.com>
fwang2002
and
wangfeng01
created
b2f7230
fix(openai,openaicompat): apply `WithName` to provider lookup and `Name()` (#212)
Click to expand commit body
The openaicompat PrepareCallFunc looked up ProviderOptions using the
hardcoded "openai-compat" key, so any name supplied via WithName was
silently ignored — users could not key their per-call options under a
custom provider name. Switch the lookup to model.Provider() so it
matches whatever name was configured.
Similarly, the openai provider's Name() method always returned the
hardcoded "openai" constant, discarding the value passed to WithName.
Return o.options.name instead so the configured name is reported
consistently.
Co-authored-by: wangfeng01 <wangfeng01@genora.com>
fwang2002
and
wangfeng01
created
d73b308
fix(anthropic): preserve `tool_use` when `ToolCallPart.Input` is empty or malformed (#219)
Click to expand commit body
json.Unmarshal("", &m) errors and previously caused the tool_use to be
silently dropped in toPrompt, leaving the matching tool_result orphaned
in the next user message. The Anthropic API then rejects the request
with "tool_result must have a corresponding tool_use in the previous
message". Default empty/whitespace input to {} (and nil for the
server_tool_use branch); on malformed-but-non-empty input, emit {} +
a CallWarning rather than dropping the block.
Hit in the wild via DeepSeek's anthropic-compat endpoint, which emits
empty input for parameterless tool calls.
Lauri Jutila
created
505a5b8
chore(deps): upgrade kronk to v1.24.0 (#218)
5975b48
fix(openaicompat): parse "reasoning" field and include reasoning_content on tool call messages (#196)
Click to expand commit body
Some OpenAI-compatible providers (e.g. Moonshot AI/Kimi) send reasoning
content under the "reasoning" JSON field rather than "reasoning_content".
The ReasoningData struct only looked for "reasoning_content", silently
dropping all reasoning from these providers.
Additionally, when thinking is enabled, providers like Kimi require
reasoning_content to be present on all assistant tool call messages,
even if empty. Without this, multi-turn conversations with tool calls
fail with "thinking is enabled but reasoning_content is missing".
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
carsonfarmer
and
Claude Opus 4.6 (1M context)
created
d13521a
chore(openai): add missing constants and checks for some thinking effort levels (#186)
Click to expand commit body
We were missing some "none", "minimal" and "xhigh" constants, for the `openai`, `openaicompat` and `openrouter` packages.
Added the missing checks to ensure they work as well.
Co-authored-by: Andrey Nering <andreynering@users.noreply.github.com>
4620329
fix(providers/openai): emit source parts for Responses API streaming annotations (#187)
Click to expand commit body
The Responses API streaming path was missing a handler for
"response.output_text.annotation.added" events. This meant that
url_citation and file_citation annotations—which carry source
URLs and titles for web search results—were silently dropped
during streaming.
The non-streaming Generate path and the Chat Completions API
streaming path both handled annotations correctly; only the
Responses API Stream path was affected.
Add a case for "response.output_text.annotation.added" that
parses the annotation map and yields StreamPartTypeSource parts
for url_citation and file_citation types, matching the behavior
of the existing Generate path and the Anthropic provider.
Update TestResponsesStream_WebSearchResponse to include
annotation.added events in the mock stream and assert that
source parts are emitted with the correct URL, title, and type.