GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — chore: sync fantasy with upstream v0.45.5 by mafredri · Pull Request #31288 · coder/coder

Conversation

@mafredri

@mafredri mafredri commented Oct 26, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Moves the fantasy pin to the tip of coder_2_33 (85ffbbe). That commit is coder/fantasy#72, which merges 87 upstream charmbracelet/fantasy commits, v0.40.0 to v0.45.5. Between the two pins 117 files change. Upstream's own v0.40.0 to v0.45.5 change, without tests, testdata, examples, go.sum and the kronk provider, is 43 files, +2271/−928.

What reaches chatd

chatd builds only the anthropic, openai and openaicompat fantasy clients (chatprovider.ModelFromConfig); other vendors reach it through the AI Gateway on one of those. So the upstream changes to the Google, Vercel, OpenRouter, Bedrock, Azure and kronk providers, and to the fantasy.Agent loop and its retries, do not run in chatd. These do:

  • Chat Completions and openaicompat streams keep reasoning on batched and DeepSeek-shaped chunks, keep finish_reason: length when tool calls are truncated, and stop sending empty reasoning fields. openaicompat drops assistant turns that hold only reasoning.
  • Token usage. When an OpenAI-shaped backend reports reasoning tokens apart from completion tokens (reasoning larger than output), output tokens now include them, so that backend's reported output tokens and cost rise. OpenAI's own shape, where reasoning is a subset, is unchanged.
  • Responses. A content-filtered turn no longer reads as a tool-call turn.
  • Context overflow. Baseten, Fireworks and Parasail prompt-length errors set ContextTooLargeErr, which compaction acts on.
  • Anthropic. Tool calls whose content block never closes are reported. For Claude 5 models, thinking defaults to display: "summarized" when the chat config sets none; a configured display still wins. TestThinkingDropBlockModel_RetriesWithEffort now expects the field in the retry body.
  • Anthropic keepalives. Fantasy forwards message_start, message_delta and unknown events as content-free keepalive parts. The first one arrives before any model output, so this PR makes ttft_seconds and the time_to_first_token stage skip them, as they skip warnings. They still reset the stream silence guard. processStepStream ignores them, and the debug recorder counts them in its part count but records no content.
  • Tool-result media now goes through upstream's shared ToolRunBuffer, which replaces fix(providers): keep tool batches ahead of media messages fantasy#64 and does the same thing.

#72 keeps coder's anthropic-sdk-go and openai-go forks, Go 1.26 and kronk v1.31.5, so upstream's SDK and Go moves do not come along.

go mod tidy raises the modules fantasy v0.45.5 requires, among them otel exporters v1.47, the AWS SDK, google.golang.org/api v0.307 and go-openapi v1. All are upgrades.

The go.mod comment now names #72 as the upstream sync.

#29861 stacks on this PR to pin coder/fantasy#62.

Verification
  • go build ./....
  • go test passes on every package that imports fantasy (coderd/x/chatd/...), and go test ./coderd -run 'TestChat|TestExpChat|TestMCP|TestAIBridge' passes.
  • TestGuardedStreamTTFTStage/WarningsAndKeepalivesThenContentObservesOnce fails without the TTFT change (TTFT observed 0s instead of 1s) and passes with it.
  • make pre-commit passes. The generated Prometheus docs pick up the metric help change.

Not verified against live backends in this PR: the stream fixes, the token usage change and the context-overflow patterns have no coder test against a real provider. coder/fantasy#72 reports a local chatd run against the AI Gateway on Anthropic, Responses, OpenAI Chat and openaicompat.

🤖 This PR was created with the help of Coder Agents, and will be reviewed by a human. 🏂🏻

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
mafredri added 2 commits October 26, 2026 16:20
@mafredri
chore: sync fantasy with upstream v0.45.5
d9119be
Pin coder/fantasy coder_2_33 at 85ffbbe (coder/fantasy#72), which
merges charmbracelet/fantasy v0.45.5. go mod tidy raises the modules
fantasy now requires.

Claude 5 thinking now defaults to display summarized when the chat
config sets none, so the drop_block retry body carries it.
@mafredri
fix: keep Anthropic keepalives out of time to first token
79dfe14
Fantasy now forwards Anthropic message_start, message_delta and unknown
events as content-free keepalive parts. The first one arrives before
any model output, so counting it closed the TTFT window early.
@github-actions

github-actions Bot commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

Docs preview

Check off each page once it's been reviewed. If a page changes in a later push, its checkbox clears automatically so it gets a fresh look. Pages not yet wired into the docs navigation aren't listed here.

  • docs/admin/integrations/prometheus.md
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot assigned mafredri Oct 26, 2026
@mafredri mafredri mentioned this pull request Oct 26, 2026
feat: show web searches and the pages they found in chats #29861
Merged
@mafredri
mafredri marked this pull request as ready for review October 26, 2026 17:02
@mafredri
mafredri requested a review from nickvigilante as a code owner October 26, 2026 17:02
@pr-queue-manager
pr-queue-manager Bot requested a review from ibetitsmike October 26, 2026 17:04
ethanndickson
ethanndickson approved these changes Oct 27, 2026
View reviewed changes
@ethanndickson
ethanndickson merged commit 1aff810 into main Oct 27, 2026
64 of 65 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@ethanndickson
ethanndickson deleted the mafredri/fantasy-sync-v0.45.5 branch October 27, 2026 00:29
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 27, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

@ethanndickson ethanndickson ethanndickson approved these changes
@nickvigilante nickvigilante Awaiting requested review from nickvigilante
@ibetitsmike ibetitsmike Awaiting requested review from ibetitsmike

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@mafredri mafredri

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@mafredri @ethanndickson
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.