Skip to content

Ask Sage Tool Calling#12300

Open
alex-mcgraw-askSage wants to merge 3 commits intocontinuedev:mainfrom
alex-mcgraw-askSage:asksage-tool-calling
Open

Ask Sage Tool Calling#12300
alex-mcgraw-askSage wants to merge 3 commits intocontinuedev:mainfrom
alex-mcgraw-askSage:asksage-tool-calling

Conversation

@alex-mcgraw-askSage
Copy link
Copy Markdown
Contributor

@alex-mcgraw-askSage alex-mcgraw-askSage commented May 4, 2026

Description

Models on Ask Sage (at least models that support it) now allow tool calling.

AI Code Review

  • Team members only: AI review runs automatically when PR is opened or marked ready for review
  • Team members can also trigger a review by commenting @continue-review

Checklist

  • I've read the contributing guide
  • The relevant docs, if any, have been updated or created
  • The relevant tests, if any, have been updated or created

Screen recording or screenshot

image image

Tests

Test adapters were added and working.


Summary by cubic

Adds tool calling to the askSage provider in both chat and streaming. Tool calls are normalized across providers and preserved across turns for reliable agent behavior.

  • New Features

    • Enable tool calling in Asksage LLM and askSage OpenAI adapter for chat and streamChat (via useOpenAIAdapterFor).
    • Prefer tool_calls_unified when present; normalize OpenAI/Anthropic/unified tool calls to OpenAI function format and include in tool_calls.
    • Preserve multi-turn context by serializing prior tool calls and tool results in Ask Sage message history.
    • Mark askSage as tool-capable in PROVIDER_TOOL_SUPPORT; support env overrides ASKSAGE_USER_API_URL and ASKSAGE_EMAIL.
  • Bug Fixes

    • Correctly parse and stream tool calls from Anthropic and Google-backed models; set finish_reason: tool_calls when tools are returned.

Written for commit 53356fc. Summary will update on new commits.

@alex-mcgraw-askSage alex-mcgraw-askSage marked this pull request as ready for review May 4, 2026 20:40
@alex-mcgraw-askSage alex-mcgraw-askSage requested a review from a team as a code owner May 4, 2026 20:40
@alex-mcgraw-askSage alex-mcgraw-askSage requested review from sestinj and removed request for a team May 4, 2026 20:40
@dosubot dosubot Bot added the size:L This PR changes 100-499 lines, ignoring generated files. label May 4, 2026
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 10 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="packages/openai-adapters/src/apis/AskSage.ts">

<violation number="1" location="packages/openai-adapters/src/apis/AskSage.ts:480">
P2: Custom agent: **Don't use console.log**

New `console.log` usage was added; use the project logger or remove the debug log instead.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review, or fix all with cubic.

Comment thread packages/openai-adapters/src/apis/AskSage.ts Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L This PR changes 100-499 lines, ignoring generated files.

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant