Skip to content

fix: use self.client.base_url in acompletion method - #32

Merged
alexzhang13 merged 1 commit into
alexzhang13:mainfrom
alt-glitch:fix/openai-client-base-url-attribute
Jan 7, 2026
Merged

alexzhang13 merged 1 commit into
alexzhang13:mainfrom
alt-glitch:fix/openai-client-base-url-attribute

Conversation

@alt-glitch

Copy link
Copy Markdown
Contributor

Summary

  • Fixed AttributeError: 'OpenAIClient' object has no attribute 'base_url' in async completion
  • The acompletion method was using self.base_url instead of self.client.base_url
  • Matches the sync completion method which correctly uses self.client.base_url

This bug caused recursive LLM calls to fail repeatedly:

["Error: 'OpenAIClient' object has no attribute 'base_url'", 
 "Error: 'OpenAIClient' object has no attribute 'base_url'", ...]

The acompletion method was incorrectly accessing self.base_url which
doesn't exist. Changed to self.client.base_url to match the sync
completion method.

@lakshyaag lakshyaag 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.

That's my bad, thanks for catching it.

@alexzhang13
alexzhang13 merged commit a30805b into alexzhang13:main Jan 7, 2026
3 checks passed
@alexzhang13

Copy link
Copy Markdown
Owner

Yeah I've been largely glossing over a lot of the client PRs but I'll add tests for them to prevent this in the future...

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.

3 participants