graniet / graniet/llm

Google Gemini now supports thinking tokens

Open
#97 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
365
Forks
90
PR merge metrics
No merged PRs in 30d

Description

Here is a sample as a get request

#!/bin/bash
set -e -E

GEMINI_API_KEY="$GEMINI_API_KEY"
MODEL_ID="gemini-3-flash-preview"
GENERATE_CONTENT_API="streamGenerateContent"

cat << EOF > request.json
{
"contents": [
{
"role": "user",
"parts": [
{
"text": "INSERT_INPUT_HERE"
},
]
},
],
"generationConfig": {
"temperature": 0,
"thinkingConfig": {
"thinkingLevel": "MINIMAL",
},
},
}
EOF

curl \
-X POST \
-H "Content-Type: application/json" \
"https://generativelanguage.googleapis.com/v1beta/models/${MODEL_ID}:${GENERATE_CONTENT_API}?key=${GEMINI_API_KEY}" -d '@request.json'

Contributor guide

Open the contributing guide

Research direction

The issue names no repository files or tests; start by locating the Rust Gemini integration and its request/response tests. Compare the supplied thinkingConfig request with the current integration, then determine the expected support and verify it with the relevant tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
ai, backend-api-design
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.