Determine this is the right repository
Summary of the issue
Context
The vendored-ibis operation definitions for the AI.GENERATE_* functions
misspell the full_response struct field as full_resposne:
packages/bigframes/third_party/bigframes_vendored/ibis/expr/operations/ai_ops.py
- line 42 (
AIGenerate): pa.field("full_resposne", pa.string())
- line 65 (
AIGenerateBool): ("full_resposne", dt.string)
- line 84 (
AIGenerateInt): ("full_resposne", dt.string)
- line 105 (
AIGenerateDouble): ("full_resposne", dt.string)
The public-facing dtype in bigframes/operations/ai_ops.py spells the field
correctly (pa.field("full_response", dtypes.JSON_ARROW_TYPE)), and the
AI.GENERATE_* SQL functions themselves return a field named full_response.
Because of this mismatch, .struct.field("full_response") succeeds at plan
time (validated against the correctly-spelled bigframes dtype) but raises
KeyError: 'full_response' when the expression is compiled by the default
(ibis) compiler — i.e. on .to_pandas(), .cache(), etc.
.struct.explode() fails the same way, since it iterates the
correctly-spelled field names from the pandas dtype and calls
.field(name) for each.
Note the vendored dtype also declares the field as dt.string, while the
bigframes-level dtype says JSON — fixing the spelling may surface that
secondary inconsistency.
Expected Behavior:
response.struct.field("full_response") returns the full model response
JSON, as documented in the generate_bool/generate_double docstrings
(whose doctest output shows the struct containing full_response).
Actual Behavior:
response.struct.field("full_response") raises KeyError: 'full_response'
API client name and version
bigrames 2.36.0 (still present on main (2.45.0) as of 2026-07-14)
Reproduction steps: code
import bigframes.pandas as bpd
import bigframes.bigquery as bbq
df = bpd.DataFrame({"text": ["the sky is blue"]})
response = bbq.ai.generate_bool(
(df["text"], " — is this statement about nature?"),
connection_id="..",
endpoint="gemini-2.5-flash-lite",
)
response.struct.field("result").to_pandas() # works
response.struct.field("full_response").to_pandas() # KeyError: 'full_response'
Reproduction steps: supporting files
No response
Reproduction steps: actual results
KeyError: 'full_response'
Reproduction steps: expected results
full model response JSON
OS & version + platform
No response
Python environment
No response
Python dependencies
No response
Additional context
No response
Determine this is the right repository
Summary of the issue
Context
The vendored-ibis operation definitions for the
AI.GENERATE_*functionsmisspell the
full_responsestruct field asfull_resposne:packages/bigframes/third_party/bigframes_vendored/ibis/expr/operations/ai_ops.pyAIGenerate):pa.field("full_resposne", pa.string())AIGenerateBool):("full_resposne", dt.string)AIGenerateInt):("full_resposne", dt.string)AIGenerateDouble):("full_resposne", dt.string)The public-facing dtype in
bigframes/operations/ai_ops.pyspells the fieldcorrectly (
pa.field("full_response", dtypes.JSON_ARROW_TYPE)), and theAI.GENERATE_*SQL functions themselves return a field namedfull_response.Because of this mismatch,
.struct.field("full_response")succeeds at plantime (validated against the correctly-spelled bigframes dtype) but raises
KeyError: 'full_response'when the expression is compiled by the default(ibis) compiler — i.e. on
.to_pandas(),.cache(), etc..struct.explode()fails the same way, since it iterates thecorrectly-spelled field names from the pandas dtype and calls
.field(name)for each.Note the vendored dtype also declares the field as
dt.string, while thebigframes-level dtype says JSON — fixing the spelling may surface that
secondary inconsistency.
Expected Behavior:
response.struct.field("full_response")returns the full model responseJSON, as documented in the
generate_bool/generate_doubledocstrings(whose doctest output shows the struct containing
full_response).Actual Behavior:
response.struct.field("full_response")raisesKeyError: 'full_response'API client name and version
bigrames 2.36.0 (still present on
main(2.45.0) as of 2026-07-14)Reproduction steps: code
import bigframes.pandas as bpd
import bigframes.bigquery as bbq
df = bpd.DataFrame({"text": ["the sky is blue"]})
response = bbq.ai.generate_bool(
(df["text"], " — is this statement about nature?"),
connection_id="..",
endpoint="gemini-2.5-flash-lite",
)
response.struct.field("result").to_pandas() # works
response.struct.field("full_response").to_pandas() # KeyError: 'full_response'
Reproduction steps: supporting files
No response
Reproduction steps: actual results
Reproduction steps: expected results
full model response JSON
OS & version + platform
No response
Python environment
No response
Python dependencies
No response
Additional context
No response