Repository navigation
chore: point charm.land/fantasy at coder/fantasy#85 - #31746
ethanndickson merged 2 commits into
Conversation
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Keep it up! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
93780fc to
842e051
Compare
842e051 to
1a16dd4
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. Nice work! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
1a16dd4 to
e7fa56f
Compare
A Chat Completions tool message holds only text, so fantasy sends tool result media in a user message right after it. That gave tool output the authority of the user's own words. coder/fantasy#84 puts a text part ahead of the media that names the tool call and says the content is tool output, not instructions from the user. The PDF tool result test now expects that label.
e7fa56f to
7340799
Compare
The fantasy OpenAI provider sent the output token limit as max_tokens unless the model ID looked like a reasoning model. OpenAI and Azure OpenAI reject max_tokens for reasoning models, and an Azure deployment name cannot show what model it serves. coder/fantasy#85 sends max_completion_tokens on every OpenAI Chat Completions request. The OpenAI-compatible providers keep max_tokens. A new test checks the field on the OpenAI and OpenAI-compatible routes, and the models docs no longer limit Max Completion Tokens to reasoning models.
Part of CODAGT-1430
Relates to CODAGT-1541
Stacked on #31743.
This bumps fantasy to pick up coder/fantasy#84 and coder/fantasy#85.
A Chat Completions tool message can only hold text, so fantasy sends tool result media (images, audio, and now PDFs from #31384) in a
role: "user"message right after it. That gives whatever the tool returned the authority of the user's own words, which Codex flagged on #31383 as a prompt injection risk for MCP tools that return untrusted files.coder/fantasy#84 starts that user message with a text part naming the tool call and saying the content is tool output, not instructions from the user. It only changes the Chat Completions paths (
openaiwithout the Responses API,openaicompat, OpenRouter and Vercel); Anthropic and Responses keep the media inside the tool result. AI Bridge records the last user message's text as the prompt, so on the step after a tool returns media, it'll now record the label. I think that's fine for now.coder/fantasy#85 fixes the output token limit field. The OpenAI provider sent
max_tokensunless the model ID looked like a reasoning model, and reasoning models reject it:That breaks any reasoning model whose ID fantasy doesn't recognise, e.g. an Azure deployment name, which doesn't say what model it serves (Azure providers start using this client in #31952). The OpenAI provider now sends
max_completion_tokenson every Chat Completions request, which is what OpenAI deprecatedmax_tokensin favour of.openaicompat, OpenRouter and Vercel keepmax_tokens, so self-hosted servers behind the OpenAI Compatible provider are unaffected. I've added a test that checks the field on each route, and the models docs no longer say Max Completion Tokens is only for reasoning models.