Skip to content

RDBC-1217 RavenDB-27378 Adds OpenAI Responses API - #733

Open
M4xymm wants to merge 1 commit into
ravendb:v7.2from
M4xymm:RDBC-1217-reland
Open

M4xymm wants to merge 1 commit into
ravendb:v7.2from
M4xymm:RDBC-1217-reland

Conversation

@M4xymm

@M4xymm M4xymm commented Dec 3, 2026

Copy link
Copy Markdown
Member

Issue link

https://issues.ravendb.net/issue/RDBC-1217

Description

Re-lands #700, reverted in #729 so that 7.2.10 shipped without it. Merge once the C# change is in a released RavenDB version.

OpenAI, Azure OpenAI and Ollama connection strings accept chatApi ("Responses" or "ChatCompletions") and reasoningEffort, and Ollama accepts an optional apiKey.

Port of PR #24031

  • Changed: new OpenAiChatApiSettings base and OpenAiChatApiType type; OpenAiSettings and AzureOpenAiSettings extend it, reasoningEffort moves from OpenAiSettings to the base; OllamaSettings gets apiKey, chatApi and reasoningEffort; seed is marked deprecated.
  • Not ported: the default API per provider and the Responses request handling, which run on the server; the dimensions and Google validation rules, which have no matching fields in the Node.js settings.
  • Tests: test/Ported/Issues/RavenDB_27378.ts covers comparison and validation of the new fields and a save and load round trip; the C# provider tests check server request shapes and are not ported.
  • Checks: prepare, lint, check-exports and check-imports pass; the settings tests pass; the round trip test was skipped locally by its 7.2 server guard.

Decision needed

In C#, OllamaSettings now derives from the OpenAI base, with Uri as an alias of Endpoint. Here, OllamaSettings stays its own class and gets the new fields directly, because the base class field endpoint would be serialized as Endpoint next to Uri, and the server reads the address from Uri.

  • Keep the current shape (recommended): uri and the stored key are unchanged, and no caller has to change.
  • Make OllamaSettings extend OpenAiChatApiSettings: this matches C#, but it needs custom serialization to write endpoint as Uri, and it changes the constructor and uri handling.

Type of change

  • Bug fix
  • Regression bug fix
  • Optimization
  • New feature
  • Sync with the C# client (no version bump, versions are bumped at release)
  • Dependency / tooling / CI update

Target branch and backports

  • This PR targets the correct release branch (e.g. v7.2, v7.1, v7.0, v6.0)
  • The change needs to be ported to other release branches. Please list them.
  • No other release branch is affected

How risky is the change?

  • Low
  • Moderate
  • High
  • Not relevant

Backward compatibility

  • Non breaking change
  • Ensured. Please explain how has it been implemented?
  • Breaking change (public API, exported types, default behavior). Please describe the migration path.
  • Not relevant

Server compatibility

  • Works with all RavenDB server versions covered by CI
  • Requires a minimum server version. Please specify which one and make sure the tests are gated accordingly.
  • Not relevant

Affected runtimes

  • Node.js
  • Bun
  • Deno
  • Cloudflare Workers
  • Not runtime specific

Public API

  • New or changed public API. New types are exported from src/index.ts (npm run check-exports passes).
  • Version bump: package.json and CLIENT_VERSION in src/Http/RequestExecutor.ts (sync / release PRs only)
  • No public API changes

Documentation update

  • README.md has been updated
  • No documentation update is needed

Testing by Contributor

  • Tests have been added that prove the fix is effective or that the feature works
  • Existing tests verify the correct behavior
  • It has been verified by manual testing
  • npm run lint, npm run build, npm run check-exports and npm run check-imports pass locally
  • Tests have been run locally against a RavenDB server (RAVENDB_TEST_SERVER_PATH / RAVENDB_SERVER_VERSION)
  • Runtime-specific changes have been verified on the affected runtime (Bun / Deno / Cloudflare Workers)

Dependencies

  • New or updated runtime dependency. Please explain why it is needed and confirm it works on all affected runtimes.
  • Dev dependency only
  • No dependency changes

Is there any existing behavior change of other features due to this change?

  • Yes. Please list the affected features/subsystems and provide appropriate explanation
  • No

Ticket: RDBC-1217
C# change: ravendb/ravendb#24031

SDK Sync Agent

@M4xymm M4xymm added the sdk-sync Port of C# client changes from an SDK sync task label Dec 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sdk-sync Port of C# client changes from an SDK sync task

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant