Skip to content

Commit ef7e376

Browse files
authored
Update comments for finish reason mapping
1 parent c1eea2d commit ef7e376

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/google/adk/models/lite_llm.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,9 @@
9898
# 1. FinishReason.TOOL_CALL enum does not exist (as of google-genai 0.8.0)
9999
# 2. Tool calls represent normal completion (model stopped to invoke tools)
100100
# 3. Gemini native responses use STOP for tool calls (see lite_llm.py:910)
101+
# 4. Mapping tool-related finish reasons to STOP preserves backward
102+
# compatibility with existing ADK consumers that assume STOP
103+
# indicates a successful, non-error completion.
101104
_FINISH_REASON_MAPPING = {
102105
"length": types.FinishReason.MAX_TOKENS,
103106
"stop": types.FinishReason.STOP,

0 commit comments

Comments
 (0)