Commit 1a6ea1d
committed
refactor(gemini): Add type safety and fix reader lock handling
- Add explicit TypeScript interfaces for Gemini API structures:
ThinkingLevel, ThinkingConfig, GenerationConfig, RequestBody, Content, etc.
- Add isValidThinkingLevel() type guard to validate config values early
- Validate thinkingLevel at start of buildRequestBody() with clear error message
- Remove all 'any' types and replace with proper interface types
- Fix double releaseLock() call by removing it from cancel() callback
- Guard reader.releaseLock() in finally block with null-check
- Add JSDoc documentation to getMaxOutputTokens() clarifying that reasoning
tokens count towards output token limit1 parent b90c9b1 commit 1a6ea1d
File tree
0 file changed
+0
-0
lines changed0 file changed
+0
-0
lines changed
0 commit comments