Skip to content

Nate/continue-sdk-more-routes #6646

New issue

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

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

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

sestinj
Copy link
Contributor

@sestinj sestinj commented Jul 16, 2025

Description

Adds more routes to the Continue SDK

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

Tests

This is generated code, but has been tested as a part of the CLI


Summary by cubic

Added new API routes and models to the Continue SDK for both Python and TypeScript, including endpoints for assistants, organizations, free trial status, and policy management.

  • New Features
    • Added endpoints for getting a specific assistant, listing organizations, checking free trial status, syncing secrets, and retrieving policy data.
    • Updated generated models and documentation to support new API responses.

@sestinj sestinj requested a review from a team as a code owner July 16, 2025 00:58
@sestinj sestinj requested review from tomasz-stefaniak and removed request for a team July 16, 2025 00:58
@dosubot dosubot bot added the size:XXL This PR changes 1000+ lines, ignoring generated files. label Jul 16, 2025
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.

cubic found 9 issues across 66 files. Review them in cubic.dev

React with 👍 or 👎 to teach cubic. Tag @cubic-dev-ai to give specific feedback.

/**
* Check if a given object implements the ListOrganizations200Response interface.
*/
export function instanceOfListOrganizations200Response(value: object): value is ListOrganizations200Response {
Copy link
Contributor

Choose a reason for hiding this comment

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

The type of the value parameter is object, which does not allow indexing with a string key. This can cause a TypeScript error when accessing value['organizations']. Consider using Record<string, unknown> or any as the parameter type.

Suggested change
export function instanceOfListOrganizations200Response(value: object): value is ListOrganizations200Response {
export function instanceOfListOrganizations200Response(value: any): value is ListOrganizations200Response {


def testGetAssistant404Response(self):
"""Test GetAssistant404Response"""
# inst_req_only = self.make_instance(include_optional=False)
Copy link
Contributor

Choose a reason for hiding this comment

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

Test case for required parameters is commented out, so the test does not actually verify the behavior of GetAssistant404Response with required parameters.

Suggested change
# inst_req_only = self.make_instance(include_optional=False)
inst_req_only = self.make_instance(include_optional=False)


def testGetPolicy200Response(self):
"""Test GetPolicy200Response"""
# inst_req_only = self.make_instance(include_optional=False)
Copy link
Contributor

Choose a reason for hiding this comment

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

Test cases are commented out, so no actual tests are being run. This means the test will always pass regardless of code correctness.

*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/

import { mapValues } from "../runtime";
import { mapValues } from '../runtime';
Copy link
Contributor

Choose a reason for hiding this comment

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

mapValues is imported but never used anywhere in this file, resulting in dead code and potential TypeScript compile errors when noUnusedLocals is enabled.


def testGetAssistant200Response(self):
"""Test GetAssistant200Response"""
# inst_req_only = self.make_instance(include_optional=False)
Copy link
Contributor

Choose a reason for hiding this comment

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

Test methods should include at least one assertion or meaningful test logic. This test currently only contains commented-out code, so it does not actually test anything.

/**
* Check if a given object implements the GetModelsAddOnCheckoutUrl200Response interface.
*/
export function instanceOfGetModelsAddOnCheckoutUrl200Response(value: object): value is GetModelsAddOnCheckoutUrl200Response {
Copy link
Contributor

Choose a reason for hiding this comment

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

The type of the 'value' parameter is 'object', which does not allow indexing with a string key in TypeScript. This can cause a type error when accessing value['url']. Consider using 'any' or a more specific type that allows string indexing.

Suggested change
export function instanceOfGetModelsAddOnCheckoutUrl200Response(value: object): value is GetModelsAddOnCheckoutUrl200Response {
export function instanceOfGetModelsAddOnCheckoutUrl200Response(value: any): value is GetModelsAddOnCheckoutUrl200Response {

# create an instance of GetModelsAddOnCheckoutUrl200Response from a JSON string
get_models_add_on_checkout_url200_response_instance = GetModelsAddOnCheckoutUrl200Response.from_json(json)
# print the JSON string representation of the object
print(GetModelsAddOnCheckoutUrl200Response.to_json())
Copy link
Contributor

Choose a reason for hiding this comment

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

Calling to_json() as a static method on the class will not serialize the instance; it should be called on the instance to get the JSON representation.

Suggested change
print(GetModelsAddOnCheckoutUrl200Response.to_json())
print(get_models_add_on_checkout_url200_response_instance.to_json())

return typeof apiKey === "function" ? apiKey : () => apiKey;
constructor(private configuration: ConfigurationParameters = {}) {}

set config(configuration: Configuration) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Setter parameter type does not match the underlying configuration property type (ConfigurationParameters), causing type incompatibility and misleading API usage.

Suggested change
set config(configuration: Configuration) {
set config(configuration: ConfigurationParameters) {


# Configure Bearer authorization: apiKeyAuth
configuration = openapi_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
Copy link
Contributor

Choose a reason for hiding this comment

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

The example references os.environ but the snippet never imports the os module, so copying the code as-is raises NameError.

Base automatically changed from nate/continue-proxy-openai-adapter to main July 16, 2025 23:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:XXL This PR changes 1000+ lines, ignoring generated files.
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

1 participant