Skip to content

Increasing timeouts for generation to 15 seconds #23

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

Closed
wants to merge 2 commits into from

Conversation

cbjuan
Copy link
Member

@cbjuan cbjuan commented Jun 3, 2025

Description

Increasing the providerTimeout and inlineProviderTimeout to 15 seconds by default

Linked Issue(s)

Fixes #22

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Manually

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@cbjuan cbjuan added the enhancement New feature or request label Jun 3, 2025
Copy link
Collaborator

@ajbozarth ajbozarth left a comment

Choose a reason for hiding this comment

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

On an initial read through this seems like a hack. Instead of using the built in settings we're creating our own new settings value and manually overriding the defaults. we should instead leverage the default settings.

Comment on lines +44 to +59
},
"providerTimeout": {
"title": "Provider Timeout (milliseconds)",
"description": "Timeout for completion provider requests in milliseconds. Recommended value is 15000 (15 seconds) for Qiskit Code Assistant API.",
"type": "number",
"default": 15000,
"minimum": 1000,
"maximum": 30000
},
"inlineProviderTimeout": {
"title": "Inline Provider Timeout (milliseconds)",
"description": "Timeout for inline completion provider requests in milliseconds.",
"type": "number",
"default": 15000,
"minimum": 1000,
"maximum": 30000
Copy link
Collaborator

Choose a reason for hiding this comment

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

These settings already exist in core jupyterlab. I'm unsure of the ramifications of duplicating them here

schema: ISettingRegistry.IProperty = {
default: {
enabled: true,
timeout: 10000
Copy link
Collaborator

Choose a reason for hiding this comment

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

from what I can tell we can achieve the same results by just increasing this value instead of the surrounding code changes

Comment on lines +85 to +88
get timeout(): number {
return (this.settings.composite['providerTimeout'] as number) || 15000;
}

Copy link
Collaborator

Choose a reason for hiding this comment

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

(without checking the core code) is this overriding something? where is this called

@cbjuan
Copy link
Member Author

cbjuan commented Jun 26, 2025

Thanks for the review, Alex. I think this is not the proper way to do it, so I'll close it.

@cbjuan cbjuan closed this Jun 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Increase timeouts for generation
2 participants