Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Process thinking blocks with Anthropic provider and write to the Output. #4425

Closed

Conversation

ferenci84
Copy link
Contributor

Description

Let us see the human-readable parts of the thinking blocks in the LLM output.

This is a first step on the way of full implementation of handling thinking blocks.

Checklist

  • The relevant docs, if any, have been updated or created
  • The relevant tests, if any, have been updated or created

Screenshots

[ For visual changes, include screenshots. ]
Screenshot 2025-03-01 at 14 18 00

Testing instructions

Thinking can be enabled in config this way:

   {
      "title": "Anthropic - Claude 3.7 Sonnet (thinking)",
      "model": "claude-3-7-sonnet-latest",
      "provider": "anthropic",
      "apiKey": "xxx",
      "completionOptions": {
        "temperature": 1,
        "topP": 0.999,
        "maxTokens": 8096
      },
      "requestOptions": {
        "extraBodyProperties": {
          "thinking": {
            "type": "enabled",
            "budget_tokens": 2048
          }
        }
      },
      "cacheBehavior": {
        "cacheConversation": true,
        "cacheSystemMessage": true
      }
    },

Watch the Continue - LLM Prompt/Completion output tab.

Next steps

  1. The thinking mode doesn't currently work with tool use. The software should add the thinking and redacted_thinking blocks to the conversation history when sending subsequent requests. Tool use requires this, with no tool use, any thinking blocks will be ignored.

  2. human-readable thinking blocks could be added to the UI in form of collapsible boxes. This is an example from TypingMind:

Screenshot 2025-03-01 at 14 29 38

… into my_testing

# Conflicts:
#	extensions/vscode/src/autocomplete/completionProvider.ts
# Conflicts:
#	core/autocomplete/snippets/getAllSnippets.ts
# Conflicts:
#	extensions/vscode/src/autocomplete/completionProvider.ts
#	gui/src/components/TabBar/TabBar.tsx
Copy link

netlify bot commented Mar 1, 2025

Deploy Preview for continuedev ready!

Name Link
🔨 Latest commit 547db22
🔍 Latest deploy log https://app.netlify.com/sites/continuedev/deploys/67c30c08b260930008124acd
😎 Deploy Preview https://deploy-preview-4425--continuedev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@ferenci84
Copy link
Contributor Author

I sent other PR: #4426

@ferenci84 ferenci84 closed this Mar 1, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant