Skip to content

fix(openai): use versioned Mistral base URL - #1938

Merged
igordayen merged 2 commits into
embabel:mainfrom
arnabnandy7:fix/mistral-base-url
Aug 18, 2026
Merged

fix(openai): use versioned Mistral base URL#1938
igordayen merged 2 commits into
embabel:mainfrom
arnabnandy7:fix/mistral-base-url

Conversation

@arnabnandy7

Copy link
Copy Markdown
Contributor

Summary

Fixes #1937 by updating the Mistral OpenAI-compatible base URL from:

https://api.mistral.ai

to:

https://api.mistral.ai/v1

The OpenAI Java client appends /chat/completions, so Mistral requests now target the correct endpoint:

https://api.mistral.ai/v1/chat/completions

The change is provider-specific; generic and other named provider URLs remain unchanged.

Testing

  • Added regression coverage for the Mistral factory’s exact base URL.
  • Ran the focused factory and validation tests.
  • 12 tests passed with no failures or errors.
  • git diff --check passed.

Test disclaimer

The live Mistral BYOK integration test was not run because MISTRAL_API_KEY was unavailable. It should be run with a valid credential before merging:

MISTRAL_API_KEY=<key> mvn -pl embabel-agent-openai \
  -Dtest=OpenAiCompatibleModelFactoryByokIT \
  test

Signed-off-by: Arnab Nandy <arnab_nandy7@yahoo.com>
@arnabnandy7

Copy link
Copy Markdown
Contributor Author

@azanux need your assistance here to test this due to missing Mistral key. TIA

@azanux

azanux commented Aug 16, 2026

Copy link
Copy Markdown
Collaborator

@arnabnandy7 will check in the evening

@igordayen igordayen added this to the 1.5.1-Release🔵 milestone Aug 16, 2026

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

@arnabnandy7 - looks good to me

@arnabnandy7

Copy link
Copy Markdown
Contributor Author

@arnabnandy7 - looks good to me

Thanks for the review.

@azanux azanux left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@arnabnandy7 , All good for me.

Ran the IT test with mistral , working

@arnabnandy7

Copy link
Copy Markdown
Contributor Author

@arnabnandy7 , All good for me.

Ran the IT test with mistral , working

Thanks 😊👍

@igordayen

Copy link
Copy Markdown
Contributor

@arnabnandy7 - could you please rebase, thank you

@arnabnandy7

Copy link
Copy Markdown
Contributor Author

@arnabnandy7 - could you please rebase, thank you

Will do it by EOD, IST hours.

Signed-off-by: Arnab Nandy <arnab_nandy7@yahoo.com>
@arnabnandy7

Copy link
Copy Markdown
Contributor Author

@igordayen conflicts resolved, sorry for the delay

@igordayen
igordayen merged commit 709ac60 into embabel:main Aug 18, 2026
7 checks passed
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.

OpenAiCompatibleModelFactory.mistral uses incorrect base URL

3 participants