Skip to content

Conversation

@alex-mcgraw-askSage
Copy link
Contributor

@alex-mcgraw-askSage alex-mcgraw-askSage commented Jan 20, 2026

Description

With a custom config.yaml file, a user can now specify models to use the Ask Sage provider (specifically, provider name is specified as 'askSage' in the provider parameter). Users can now use the CLI tool along with the VSCode extension, and can specify what tools/capabilities they would like the models to have within the CLI, as long as that model has the ability to use tools.

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 - config.yaml file specification already in the Ask Sage documentation. (PR Update asksage.mdx #9757 )
  • [✅] The relevant tests, if any, have been updated or created

Screen recording or screenshot

image

Tests

11 tests were created in "packages/openai-adapters/src/test/asksage-adapter.vitest.ts".


Continue Tasks: ▶️ 2 queued — View all


Summary by cubic

Add AskSage provider to the CLI so you can run AskSage models with tools via config.yaml. This aligns CLI behavior with the VS Code extension.

  • New Features

    • Added AskSageApi adapter with chat completions and tool call support; streaming simulated via chunked responses. Streamed tool_calls now emit distinct indices.
    • Wired provider: "askSage" in index.ts and added AskSageConfigSchema.
    • Auth supports apiKey directly or email-based session token (env.email + env.userApiUrl) with token caching, 401 refresh, and cache reset on token-creation failure.
    • Explicit errors for unsupported APIs: embeddings, rerank, legacy completions, and FIM.
    • Added vitest coverage for requests, tools, streaming, and errors.
  • Migration

    • Set provider: "askSage" and apiKey in config.yaml.
    • Optionally set env.email and env.userApiUrl to use a session token.
    • Pass tools in CLI only if the chosen model supports tools.

Written for commit b4d3844. Summary will update on new commits.

With a custom config.yaml file, a user can now specify models to use the Ask Sage provider (specifically, provider name is specified as 'askSage' in the provider parameter). Users can now use the CLI tool along with the VSCode extension, and can specify what tools/capabilities they would like the models to have within the CLI, as long as that model has the ability to use tools.
@alex-mcgraw-askSage alex-mcgraw-askSage requested a review from a team as a code owner January 20, 2026 22:32
@alex-mcgraw-askSage alex-mcgraw-askSage requested review from sestinj and removed request for a team January 20, 2026 22:32
@dosubot dosubot bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label Jan 20, 2026
Copy link
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.

2 issues found across 4 files

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


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

<violation number="1" location="packages/openai-adapters/src/apis/AskSage.ts:155">
P1: Token retrieval failures are cached for an hour, preventing retries after a transient error.</violation>

<violation number="2" location="packages/openai-adapters/src/apis/AskSage.ts:364">
P2: Streaming tool call deltas reuse index 0 for every call, collapsing multiple tool calls into one when merging streamed responses.</violation>
</file>

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

…re being squashed into one index, but now each tool call will have its own index, and fixed a token caching issue where if the token creation failed, the promise isn't saved in cache
Copy link
Collaborator

@RomneyDa RomneyDa left a comment

Choose a reason for hiding this comment

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

Addition of Ask Sage to open ai adapters.

@alex-mcgraw-askSage note since this package is a dependency of core you could deduplicate the AskSageResponse, AskSageRequestArgs, etc. types between the two by importing them from @continuedev/openai-adapters. This is non-blocking.

@github-project-automation github-project-automation bot moved this from Todo to In Progress in Issues and PRs Jan 22, 2026
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jan 22, 2026
@RomneyDa RomneyDa merged commit f5b1d57 into continuedev:main Jan 22, 2026
55 of 57 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Issues and PRs Jan 22, 2026
@github-actions github-actions bot locked and limited conversation to collaborators Jan 22, 2026
@sestinj
Copy link
Contributor

sestinj commented Jan 22, 2026

🎉 This PR is included in version 1.8.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

lgtm This PR has been approved by a maintainer released size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants