Repository navigation
AI func named collection allow missing api key - #105701
Merged
george-larionov merged 4 commits intoMay 29, 2026
Merged
Conversation
Contributor
|
Workflow [PR], commit [feba343] Summary: ❌
AI ReviewSummaryThis PR makes Final VerdictStatus: ✅ Approve |
george-larionov
marked this pull request as ready for review
May 23, 2026 13:58
rschu1ze
reviewed
May 26, 2026
rschu1ze
approved these changes
May 26, 2026
…some providers don't need it
Update the FunctionBaseAI contract comment, all per-function docs (`aiGenerate`, `aiClassify`, `aiExtract`, `aiTranslate`, `aiEmbed`), and the AI named-collection reference docs to state that `api_key` is optional. Add a non-empty-row test case that drives the no-`api_key` path through provider construction and an actual HTTP request (swallowed via `ai_function_throw_on_error = 0`), so the runtime behavior is exercised — the previous assertion ran over a zero-row table and returned before `createAIProvider` was reached. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
george-larionov
force-pushed
the
ai-func-named-collection-allow-missing-api-key
branch
2 times, most recently
from
May 27, 2026 21:57
71ceb8e to
e11323a
Compare
…_key Mirror the existing `not all providers need API key` comment on the `OpenAIProvider::call` path to the `OpenAIProvider::embed` path and to `AnthropicProvider::call`, so all three auth-header guards explain the same rationale. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Contributor
LLVM Coverage Report
Changed lines: Changed C/C++ lines covered by tests: 43/51 (84.31%) | Lost baseline coverage: none · Uncovered code |
Member
Author
|
One test failure, memory sanitizer issue, will investigate separately. |
george-larionov
deleted the
ai-func-named-collection-allow-missing-api-key
branch
May 29, 2026 22:34
pull Bot
pushed a commit
to muzammilar/ClickHouse
that referenced
this pull request
May 31, 2026
BuzzHouse/AST-fuzzer jobs run `clickhouse-server` with its stderr piped through `tee` into `stderr.log` and `server.log`. Sanitizer reports (MSan/ASan/TSan/UBSan) and the in-process LLVM symbolizer write to that stderr. When the server aborts, the pipe's reader can go away, so the report write fails with `IO failure on output stream: Broken pipe` and is truncated before any stack frame is printed. When the report has no parseable frames, `log_parser.py` cannot compute a stack-trace id and names the failure `... (STID: None)`. The CI failure-matcher then groups every stack-less sanitizer failure under a single auto-generated issue, regardless of the real root cause, so unrelated bugs across different PRs all look like one recurring failure. Set `*_OPTIONS=log_path=/workspace/sanitizer.log` for the fuzzer server so the runtime writes the report to a regular file, which is robust to the stderr pipe breaking. After the server stops, the captured files are merged back into `stderr.log` (for the failure parser) and `server.log` (for chronological context and the OOM detection that greps it), and the raw files are uploaded as artifacts. With the report preserved, the parser can compute a real stack-trace id and distinct failures stop collapsing into one issue. CI report: https://s3.amazonaws.com/clickhouse-test-reports/PRs/105701/feba3438e46f861025a0cb811816a3138cdb67d9/buzzhouse_amd_msan/ PR: ClickHouse#105701 Issue: ClickHouse#106138 Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
4 tasks
george-larionov
added a commit
that referenced
this pull request
Jul 30, 2026
Backport #105701 to 26.5: AI func named collection allow missing api key
george-larionov
added a commit
that referenced
this pull request
Jul 31, 2026
26.5 gained #105701 (`api_key` optional) and #107927 (retry transient network errors) after this backport branch was cut, so the conflict resolution keeps both and drops the earlier `api_key`-required adaptation. `aiEmbed` stays at the master signature `aiEmbed(text, model[, params])`; `introduced_in` stays 26.5. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
kewin-robetti
pushed a commit
to viasoftkorp/ClickHouse
that referenced
this pull request
Aug 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Will be merged only after #102922.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Removing requirement for api key in AI credential named collections.
Note
Medium Risk
Changes validation and request construction so AI providers may be called without an API key, which can alter authentication behavior and lead to unexpected unauthenticated requests if misconfigured.
Overview
AI named collections no longer require
api_key;FunctionBaseAI::resolveAINamedCollectionstops throwing when it’s missing.Both
OpenAIProvider(chat + embeddings) andAnthropicProvidernow only send auth headers (Authorization/x-api-key) whenapi_keyis non-empty.Tests are updated to expect successful resolution/execution with a named collection that omits
api_key, instead of aBAD_ARGUMENTSfailure.Reviewed by Cursor Bugbot for commit f256771. Bugbot is set up for automated code reviews on this repo. Configure here.
Version info
26.6.1.246(included in26.6and later)26.5.6.88