Skip to content

Allows use of a port number for a custom OpenAI provider#4312

Merged
DOsinga merged 1 commit intoblock:mainfrom
vlascik:fix-port-number-in-custom-providers
Aug 25, 2025
Merged

Allows use of a port number for a custom OpenAI provider#4312
DOsinga merged 1 commit intoblock:mainfrom
vlascik:fix-port-number-in-custom-providers

Conversation

@vlascik
Copy link
Contributor

@vlascik vlascik commented Aug 24, 2025

Allows use of a port number, if specified in a custom OpenAI compatible provider config. Useful e.g. for LM Studio (http://127.0.0.1:1234). Port part was otherwise stripped.

Copy link
Collaborator

@DOsinga DOsinga left a comment

Choose a reason for hiding this comment

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

probably also true for anthropic?

@vlascik
Copy link
Contributor Author

vlascik commented Aug 24, 2025

probably also true for anthropic?

Anthropic provider doesn't seem to do any URL parsing that would strip the port:

let api_client = ApiClient::new(config.base_url, auth)?

@vlascik vlascik force-pushed the fix-port-number-in-custom-providers branch from 4cb3554 to 65f7883 Compare August 25, 2025 07:52
@shawn111
Copy link
Contributor

shawn111 commented Aug 25, 2025

I tried on goose-cli v1.5, it could run with env variables.
But v1.6 https://github.com/block/goose/pull/4099/commits , need this patch.

…le provider config. Useful e.g. for LM Studio.

Signed-off-by: V. Lascik <vlascik@users.noreply.github.com>
@vlascik vlascik force-pushed the fix-port-number-in-custom-providers branch from 65f7883 to ced37d6 Compare August 25, 2025 16:43
@vlascik
Copy link
Contributor Author

vlascik commented Aug 25, 2025

cargo fmt failed, sorry, I pushed a new commit. Seems the Ci needs manual approval to run again though.

@DOsinga DOsinga merged commit 21c0bb0 into block:main Aug 25, 2025
10 checks passed
shellz-n-stuff pushed a commit to shellz-n-stuff/goose that referenced this pull request Aug 27, 2025
Signed-off-by: V. Lascik <vlascik@users.noreply.github.com>
Signed-off-by: Alex Rosenzweig <arosenzweig@squareup.com>
dorien-koelemeijer pushed a commit to dorien-koelemeijer/goose that referenced this pull request Sep 2, 2025
Signed-off-by: V. Lascik <vlascik@users.noreply.github.com>
Signed-off-by: Dorien Koelemeijer <dkoelemeijer@squareup.com>
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