Skip to content

fix(gen): fix the optional dependency bug - #262

Open
OscarDDD wants to merge 2 commits into
mainfrom
fix_optional_imports
Open

OscarDDD wants to merge 2 commits into
mainfrom
fix_optional_imports

Conversation

@OscarDDD

@OscarDDD OscarDDD commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Context

Closes SAP/ai-sdk-python-backlog#242.

What this PR does and why it is needed

This is a hot fix for the customer issue regarding langchain openai. Currently users should be allowed to call lang chain openai without installing the extra dependency for amazon and google genai.

@OscarDDD OscarDDD changed the title fix the optional dependency bug fix(gen): fix the optional dependency bug Dec 1, 2026
@OscarDDD
OscarDDD marked this pull request as ready for review December 2, 2026 11:42

@hyperspace-pr-bot hyperspace-pr-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The changes consistently guard provider exports and defer provider imports until model initialization. I found no substantive correctness issues in the modified code.

PR Bot Information

Version: 1.33.64

  • LLM: gpt-6.1-sol
  • Experiment Variant: control
  • Correlation ID: 747a1228-ee45-11f1-95fd-ad6b04483137
  • File Content Strategy: Full file content
  • Event Trigger: pull_request.ready_for_review

@yamaceay yamaceay left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm. try - except - else is correct, dependencies are correctly grouped.

This branch has not been deployed

No deployments
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