Skip to content

Read OpenAI settings when the server leaves out null fields - #327

Merged
poissoncorp merged 1 commit into
ravendb:v7.2from
poissoncorp:openai-settings-omitted-endpoint
Nov 17, 2026
Merged

poissoncorp merged 1 commit into
ravendb:v7.2from
poissoncorp:openai-settings-omitted-endpoint

Conversation

@poissoncorp

@poissoncorp poissoncorp commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

RDBC-1200 Fix Python SDK vs 7.2.8 server
The server omits null fields from AI connection strings that come from a server-wide connection string. An OpenAI connection string put without an endpoint comes back with no Endpoint key, and OpenAiSettings.from_json raised KeyError: 'Endpoint' in both GetServerWideConnectionStringsOperation and GetConnectionStringsOperation.

ApiKey, Endpoint and Model are now read with get(), like the other AI provider settings.

Tests

  • New test_open_ai_settings.py parses the payload the server actually returns. It needs no server, so it runs on CI.
  • The license-gated server-wide tests in test_ravenDB_24310 failed with the KeyError on every 7.2 server and pass now.

The server omits null fields when it returns a server-wide AI connection
string, so an OpenAI connection string put without an endpoint comes back
with no Endpoint key. OpenAiSettings.from_json indexed ApiKey, Endpoint and
Model directly and raised KeyError, which broke
GetServerWideConnectionStringsOperation and GetConnectionStringsOperation
for such connection strings. Read them with get(), like the other AI
provider settings do.
@poissoncorp
poissoncorp merged commit c025914 into ravendb:v7.2 Nov 17, 2026
5 checks passed
@poissoncorp poissoncorp mentioned this pull request Nov 17, 2026
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.

1 participant