Commit log

d097d04 v0.23.2

Andrey Nering created

5698022 chore(deps): update kronk (#233)

William Kennedy created

c03d606 chore(deps): bump google.golang.org/genai (#230)

Click to expand commit body
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>

dependabot[bot] and dependabot[bot] created

e6ec395 v0.23.1

Andrey Nering created

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”>

slzcdhd and liaoyijun created

2c8825d chore(deps): bump github.com/ardanlabs/kronk (#226)

Click to expand commit body
Bumps the kronk group with 1 update in the / directory: [github.com/ardanlabs/kronk](https://github.com/ardanlabs/kronk).


Updates `github.com/ardanlabs/kronk` from 1.24.0 to 1.24.2
- [Release notes](https://github.com/ardanlabs/kronk/releases)
- [Commits](https://github.com/ardanlabs/kronk/compare/v1.24.0...v1.24.2)

---
updated-dependencies:
- dependency-name: github.com/ardanlabs/kronk
  dependency-version: 1.24.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: kronk
...

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

54c9dd5 chore(deps): bump the all group with 4 updates (#225)

Click to expand commit body
Bumps the all group with 4 updates: [github.com/aws/aws-sdk-go-v2](https://github.com/aws/aws-sdk-go-v2), [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2), [github.com/kaptinlin/jsonschema](https://github.com/kaptinlin/jsonschema) and [google.golang.org/genai](https://github.com/googleapis/go-genai).


Updates `github.com/aws/aws-sdk-go-v2` from 1.41.6 to 1.41.7
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/v1.41.6...v1.41.7)

Updates `github.com/aws/aws-sdk-go-v2/config` from 1.32.16 to 1.32.17
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.32.16...config/v1.32.17)

Updates `github.com/kaptinlin/jsonschema` from 0.7.11 to 0.7.13
- [Commits](https://github.com/kaptinlin/jsonschema/compare/v0.7.11...v0.7.13)

Updates `google.golang.org/genai` from 1.54.0 to 1.55.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.54.0...v1.55.0)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2
  dependency-version: 1.41.7
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all
- dependency-name: github.com/aws/aws-sdk-go-v2/config
  dependency-version: 1.32.17
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all
- dependency-name: github.com/kaptinlin/jsonschema
  dependency-version: 0.7.13
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all
- dependency-name: google.golang.org/genai
  dependency-version: 1.55.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

f9f1cf6 v0.23.0

Andrey Nering created

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.

Christian Rocha created

6dbd4f5 v0.22.0

Andrey Nering created

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)

William Kennedy created

ea03063 v0.21.1

Andrey Nering created

43a2aa5 test: re-record test fixtures

Andrey Nering created

d8aafda chore(deps): import strings package

Andrey Nering created

5f0d1e3 fix(openrouter): use xstrings helper

Click to expand commit body
Co-authored-by: Andrey Nering <andreynering@users.noreply.github.com>

Christian Rocha and Andrey Nering created

1720eac fix(openrouter): don't clip thinking output on claude models

Christian Rocha created

b7c17e0 ci: fix build running twice on pull requests

Andrey Nering created

f8a3e2f chore(deps): bump the all group with 2 updates (#215)

Click to expand commit body
Bumps the all group with 2 updates: [github.com/aws/smithy-go](https://github.com/aws/smithy-go) and [github.com/kaptinlin/jsonschema](https://github.com/kaptinlin/jsonschema).


Updates `github.com/aws/smithy-go` from 1.25.0 to 1.25.1
- [Release notes](https://github.com/aws/smithy-go/releases)
- [Changelog](https://github.com/aws/smithy-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/aws/smithy-go/compare/v1.25.0...v1.25.1)

Updates `github.com/kaptinlin/jsonschema` from 0.7.7 to 0.7.11
- [Commits](https://github.com/kaptinlin/jsonschema/compare/v0.7.7...v0.7.11)

---
updated-dependencies:
- dependency-name: github.com/aws/smithy-go
  dependency-version: 1.25.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all
- dependency-name: github.com/kaptinlin/jsonschema
  dependency-version: 0.7.11
  dependency-type: direct:production
  update-type: version-update:semver-patch
  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

d9ff008 v0.21.0

Andrey Nering created

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

6d22b85 feat(openai): add gpt-5.5 responses models (#211)

Michael Suchacz created

b852eff v0.20.0

Andrey Nering created

95dcd6e feat(anthropic): add document support for pdf and text file content blocks (#197)

Nic-vdwalt created

471520c fix(anthropic/openai/google): wrap `io.ErrUnexpectedEOF` as `ProviderError` (#198)

Lauri Jutila created

3bfd3c8 chore(deps): bump github.com/ardanlabs/kronk in the kronk group (#207)

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.22.2 to 1.23.1
- [Release notes](https://github.com/ardanlabs/kronk/releases)
- [Commits](https://github.com/ardanlabs/kronk/compare/v1.22.2...v1.23.1)

---
updated-dependencies:
- dependency-name: github.com/ardanlabs/kronk
  dependency-version: 1.23.1
  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>

dependabot[bot] and dependabot[bot] created

12cec64 chore(deps): bump the all group with 4 updates (#206)

Click to expand commit body
Bumps the all group with 4 updates: [github.com/aws/aws-sdk-go-v2](https://github.com/aws/aws-sdk-go-v2), [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2), [github.com/aws/smithy-go](https://github.com/aws/smithy-go) and [google.golang.org/genai](https://github.com/googleapis/go-genai).


Updates `github.com/aws/aws-sdk-go-v2` from 1.41.5 to 1.41.6
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/v1.41.5...v1.41.6)

Updates `github.com/aws/aws-sdk-go-v2/config` from 1.32.14 to 1.32.16
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.32.14...config/v1.32.16)

Updates `github.com/aws/smithy-go` from 1.24.3 to 1.25.0
- [Release notes](https://github.com/aws/smithy-go/releases)
- [Changelog](https://github.com/aws/smithy-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/aws/smithy-go/compare/v1.24.3...v1.25.0)

Updates `google.golang.org/genai` from 1.53.0 to 1.54.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.53.0...v1.54.0)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2
  dependency-version: 1.41.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all
- dependency-name: github.com/aws/aws-sdk-go-v2/config
  dependency-version: 1.32.16
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all
- dependency-name: github.com/aws/smithy-go
  dependency-version: 1.25.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: all
- dependency-name: google.golang.org/genai
  dependency-version: 1.54.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

b2c4b61 v0.19.0

Andrey Nering created

f60d4fe feat(anthropic): add `EffortXHigh` constant (#204)

Danielle Maywood created

402a113 v0.18.0

Christian Rocha created

61bc0b2 feat(agent): add the ability to stop a turn and end the agent loop

Christian Rocha created

d9b6308 v0.17.2

Christian Rocha created

15bced7 chore(agent): move tool execution after stream loop + add test

Christian Rocha created

bbf53dc fix(agent): buffer tool calls

Click to expand commit body
Wait until streaming has finished before dispatching tool calls to avoid
getting tool results without a matching call: essentially orphans.

Christian Rocha created

ce26050 ci: fix govulncheck by updating to go 1.26.2 (#201)

Andrey Nering created

5f01141 chore(deps): bump github.com/ardanlabs/kronk in the kronk group (#200)

dependabot[bot] created

06f2e8f chore(deps): bump the all group with 2 updates (#199)

dependabot[bot] created

c8896d3 chore: add `CODEOWNERS` to ask review from me

Andrey Nering created

92dc3ae chore(deps): bump github.com/ardanlabs/kronk in the kronk group (#194)

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.21.4 to 1.22.0
- [Release notes](https://github.com/ardanlabs/kronk/releases)
- [Commits](https://github.com/ardanlabs/kronk/compare/v1.21.4...v1.22.0)

---
updated-dependencies:
- dependency-name: github.com/ardanlabs/kronk
  dependency-version: 1.22.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>

dependabot[bot] and dependabot[bot] created

783847b chore(deps): bump the all group with 3 updates (#193)

Click to expand commit body
Bumps the all group with 3 updates: [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2), [github.com/aws/smithy-go](https://github.com/aws/smithy-go) and [google.golang.org/genai](https://github.com/googleapis/go-genai).


Updates `github.com/aws/aws-sdk-go-v2/config` from 1.32.13 to 1.32.14
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.32.13...config/v1.32.14)

Updates `github.com/aws/smithy-go` from 1.24.2 to 1.24.3
- [Release notes](https://github.com/aws/smithy-go/releases)
- [Changelog](https://github.com/aws/smithy-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/aws/smithy-go/compare/v1.24.2...v1.24.3)

Updates `google.golang.org/genai` from 1.52.0 to 1.52.1
- [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.52.0...v1.52.1)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/config
  dependency-version: 1.32.14
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all
- dependency-name: github.com/aws/smithy-go
  dependency-version: 1.24.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all
- dependency-name: google.golang.org/genai
  dependency-version: 1.52.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  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

32045be chore(deps): bump the all group with 5 updates (#190)

Click to expand commit body
Bumps the all group with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [cloud.google.com/go/auth](https://github.com/googleapis/google-cloud-go) | `0.18.2` | `0.19.0` |
| [github.com/aws/aws-sdk-go-v2](https://github.com/aws/aws-sdk-go-v2) | `1.41.4` | `1.41.5` |
| [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2) | `1.32.12` | `1.32.13` |
| [github.com/kaptinlin/jsonschema](https://github.com/kaptinlin/jsonschema) | `0.7.6` | `0.7.7` |
| [google.golang.org/genai](https://github.com/googleapis/go-genai) | `1.51.0` | `1.52.0` |


Updates `cloud.google.com/go/auth` from 0.18.2 to 0.19.0
- [Release notes](https://github.com/googleapis/google-cloud-go/releases)
- [Changelog](https://github.com/googleapis/google-cloud-go/blob/main/CHANGES.md)
- [Commits](https://github.com/googleapis/google-cloud-go/compare/auth/v0.18.2...v0.19.0)

Updates `github.com/aws/aws-sdk-go-v2` from 1.41.4 to 1.41.5
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/v1.41.4...v1.41.5)

Updates `github.com/aws/aws-sdk-go-v2/config` from 1.32.12 to 1.32.13
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.32.12...config/v1.32.13)

Updates `github.com/kaptinlin/jsonschema` from 0.7.6 to 0.7.7
- [Commits](https://github.com/kaptinlin/jsonschema/compare/v0.7.6...v0.7.7)

Updates `google.golang.org/genai` from 1.51.0 to 1.52.0
- [Release notes](https://github.com/googleapis/go-genai/releases)
- [Changelog](https://github.com/googleapis/go-genai/blob/v1.52.0/CHANGELOG.md)
- [Commits](https://github.com/googleapis/go-genai/compare/v1.51.0...v1.52.0)

---
updated-dependencies:
- dependency-name: cloud.google.com/go/auth
  dependency-version: 0.19.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: all
- dependency-name: github.com/aws/aws-sdk-go-v2
  dependency-version: 1.41.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all
- dependency-name: github.com/aws/aws-sdk-go-v2/config
  dependency-version: 1.32.13
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all
- dependency-name: github.com/kaptinlin/jsonschema
  dependency-version: 0.7.7
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all
- dependency-name: google.golang.org/genai
  dependency-version: 1.52.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

11a1e0f v0.17.1

Andrey Nering 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>

Michael Suchacz and Andrey Nering created

ebc9cb1 chore: run modernize (#188)

Andrey Nering created