Commit d0b2a24
docs: fix Gemini provider auth docs to match mutually-exclusive behavior (#6341)
# What does this PR do?
Fixes #5970.
The Gemini provider documentation and the `GeminiConfig` class docstring
described `access_token` as being "used instead of api_key" and stated
that
"when both are set, `access_token` takes precedence". This contradicts
the
actual behavior enforced by `GeminiConfig._validate_auth`, which:
- raises a `ValueError` when **both** `api_key` and `access_token` are
set
(they are **mutually exclusive**), and
- requires `project` to be set whenever `access_token` is used.
This PR updates the `access_token` `Field` description and the
`GeminiConfig`
docstring so they accurately describe the validation behavior, and
regenerates the provider docs via `scripts/provider_codegen.py`.
## Changes
- `src/ogx/providers/remote/inference/gemini/config.py`: correct the
class
docstring and the `access_token` field description.
- `docs/docs/providers/inference/remote_gemini.mdx`: regenerated to
match.
## Test Plan
- Docs-only / description-only change; no runtime behavior is modified.
- Ran `./scripts/provider_codegen.py` (via the codegen group) and
confirmed
the regenerated `remote_gemini.mdx` matches the updated field
description
with no other diffs.
Made with [Cursor](https://cursor.com)
Signed-off-by: Aawegg <aawegbhaladhare03@gmail.com>
Co-authored-by: Matthew Farrellee <matt@cs.wisc.edu>1 parent 4a9b998 commit d0b2a24
2 files changed
Lines changed: 5 additions & 3 deletions
File tree
- docs/docs/providers/inference
- src/ogx/providers/remote/inference/gemini
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
32 | 34 | | |
33 | 35 | | |
34 | 36 | | |
35 | 37 | | |
36 | | - | |
| 38 | + | |
37 | 39 | | |
38 | 40 | | |
39 | 41 | | |
| |||
0 commit comments