Skip to content
Closed
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
29668ce
feat: support copilot reasoning_opaque and reasoning_text
caozhiyuan Nov 19, 2025
a2467d3
feat: add signature field to AnthropicThinkingBlock
caozhiyuan Nov 19, 2025
58f7a45
feat: add idleTimeout configuration for bun server
caozhiyuan Nov 19, 2025
3fa5519
feat: enhance reasoning handling in tool calls and change the thinkin…
caozhiyuan Nov 19, 2025
dfb40d2
feat: conditionally handle reasoningOpaque in handleFinish based on t…
caozhiyuan Nov 19, 2025
7657d87
fix: handleReasoningOpaqueInToolCalls add isToolBlockOpen judge
caozhiyuan Nov 20, 2025
7f8187b
feat: support claude model thinking block
caozhiyuan Dec 3, 2025
cbe12eb
feat: enhance thinking budget calculation and rename variables for cl…
caozhiyuan Dec 10, 2025
ebcacb2
feat: update Copilot version and API version in api-config; adjust fa…
caozhiyuan Dec 11, 2025
0d6f7aa
feat: update Copilot version to 0.35.0 and fallback VSCode version to…
caozhiyuan Dec 11, 2025
dcafbe1
fix: simplify copilotBaseUrl logic and correct openai-intent header v…
caozhiyuan Dec 13, 2025
5175245
feat: interleaved thinking support
caozhiyuan Dec 31, 2025
dd80c8d
feat: enhance system prompt handling for interleaved thinking with th…
caozhiyuan Dec 31, 2025
e45c6db
feat: compatible with copilot API returning content->reasoning_text->…
caozhiyuan Jan 2, 2026
0afccfa
fix(api-config): use default API URL when account type is individual
HyunggyuJang Jan 1, 2026
8191930
Merge pull request #65 from HyunggyuJang/fix-individual-account-url
caozhiyuan Jan 2, 2026
67b357a
feat: enforce interleaved thinking protocol in message handling
caozhiyuan Jan 4, 2026
420dfe7
fix: add default thinking text for opencode compatibility in translat…
caozhiyuan Jan 21, 2026
b53203c
fix: update fallback version for VSCode and increment Copilot version
caozhiyuan Feb 5, 2026
f70abb4
refactor: remove interleaved thinking protocol support
caozhiyuan Mar 14, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: compatible with copilot API returning content->reasoning_text->…
…reasoning_opaque in different deltas
  • Loading branch information
caozhiyuan committed Jan 2, 2026
commit e45c6db3dfb54194986926ac74439bde97033250
10 changes: 10 additions & 0 deletions src/routes/messages/stream-translation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ function handleContent(
delta.content === ""
&& delta.reasoning_opaque
&& delta.reasoning_opaque.length > 0
&& state.thinkingBlockOpen
) {
events.push(
{
Expand Down Expand Up @@ -317,6 +318,15 @@ function handleThinkingText(
events: Array<AnthropicStreamEventData>,
) {
if (delta.reasoning_text && delta.reasoning_text.length > 0) {
// compatible with copilot API returning content->reasoning_text->reasoning_opaque in different deltas
// this is an extremely abnormal situation, probably a server-side bug
// only occurs in the claude model, with a very low probability of occurrence
if (state.contentBlockOpen) {
delta.content = delta.reasoning_text
delta.reasoning_text = undefined
return
}

if (!state.thinkingBlockOpen) {
events.push({
type: "content_block_start",
Expand Down