Skip to content

doc(openrouter): use explicit async_client=False#1847

Merged
jxnl merged 1 commit into567-labs:mainfrom
wongjiahau:patch-1
Oct 13, 2025
Merged

doc(openrouter): use explicit async_client=False#1847
jxnl merged 1 commit into567-labs:mainfrom
wongjiahau:patch-1

Conversation

@wongjiahau
Copy link
Copy Markdown
Contributor

@wongjiahau wongjiahau commented Oct 13, 2025

I have an issue where the default instructor.from_provider is inferred by Pyright to be AsyncInstructor:

image

the issue is fixed once I explicitly declare async_client=False.

image

Important

Explicitly set async_client=False in openrouter.md to fix type inference issues in documentation examples.

  • Documentation:
    • In openrouter.md, explicitly set async_client=False in four code examples to ensure correct type inference by Pyright.
    • Affects examples in sections: Simple User Example (Sync), Nested Object Example (Sync), Structured Outputs (Sync), and JSON Mode.

This description was created by Ellipsis for 1305fdc. You can customize this summary. It will automatically update as commits are pushed.

I have an issue where the default `instructor.from_provider` is inferred by Pyright to be `AsyncInstructor`, the issue is fixed once I explicitly declare `async_client=False`.
Copy link
Copy Markdown
Contributor

@ellipsis-dev ellipsis-dev Bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed everything up to 1305fdc in 46 seconds. Click for details.
  • Reviewed 36 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 5 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. docs/integrations/openrouter.md:37
  • Draft comment:
    Good: Explicitly setting async_client=False clarifies sync usage and fixes Pyright type inference issues.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 85% None
2. docs/integrations/openrouter.md:114
  • Draft comment:
    Explicit async_client=False improves clarity in nested object examples; looks consistent.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 85% None
3. docs/integrations/openrouter.md:163
  • Draft comment:
    Setting async_client=False here ensures structured outputs use the synchronous client as intended.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 85% None
4. docs/integrations/openrouter.md:212
  • Draft comment:
    Explicit async_client=False is now set in the JSON mode example, which aids in type clarity.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 85% None
5. docs/integrations/openrouter.md:252
  • Draft comment:
    Consider adding explicit async_client=False to the streaming example for consistency and to avoid similar type inference issues.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 85% None

Workflow ID: wflow_gHLr80J2KBiyxwIc

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

@jxnl jxnl merged commit f743dc7 into 567-labs:main Oct 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants