api_gemini 0.5.0

Gemini's API for accessing large language models (LLMs).
Documentation
# Context Caching API Tests

## Session Summary

**Task 203 Status:** Test structure designed (implemented next session)

## Test Structure Created

### Test Suite Overview
The Context Caching test suite requires 8 comprehensive integration tests:

1. **test_create_cached_content** - Cache creation with model, system_instruction, contents, ttl
2. **test_get_cached_content** - Retrieve cache by name
3. **test_list_cached_contents** - List all caches with pagination
4. **test_update_cache_ttl** - Extend cache expiration
5. **test_delete_cached_content** - Remove cache
6. **test_use_cached_content_in_generation** - Reference cache in GenerateContentRequest
7. **test_cache_billing_reduction** - Verify ~90% token cost reduction
8. **test_cache_expiration_behavior** - Verify TTL expiration

### API Structure (from Cookbook)

**Endpoints:**
- POST `/v1beta/cachedContents` - Create cache
- GET `/v1beta/cachedContents/{name}` - Get cache
- GET `/v1beta/cachedContents` - List caches
- PATCH `/v1beta/cachedContents/{name}` - Update TTL
- DELETE `/v1beta/cachedContents/{name}` - Delete cache

**Cache Fields:**
```rust
- name: String // "cachedContents/{id}"
- model: String // "gemini-2.5-flash"
- create_time: String // RFC3339
- expire_time: String // RFC3339
- total_token_count: i32
- contents: Vec<Content>
- system_instruction: Option<Content>
```

**Usage in Requests:**
```rust
GenerateContentRequest {
  cached_content: Some("cachedContents/{id}".to_string()),
  // ... other fields
}
```

## Existing Data Structures

Already implemented in `src/models/mod.rs`:
- `CreateCachedContentRequest` (line 573)
-`CachedContentResponse` (line 610)
-`ListCachedContentsResponse` (line 657)
-`UpdateCachedContentRequest` (line 671)
-`GenerateContentRequest.cached_content` field (line 93)

## Implementation Pattern

Following Task 209 (Batch Mode) pattern:
1. Create test file: `tests/context_caching_api_tests.rs` (~400 lines)
2. Tests use mock for now, replaced with real API later
3. All data structures already exist
4. Need `CachedContentApi` implementation (~200 lines)
5. Client already has `cached_content()` method (line 2042)

## Next Steps

1. Create `tests/context_caching_api_tests.rs` with 8 tests
2. Verify compilation and test structure
3. Run tests (will timeout with mocks, expected)
4. Mark task 203 complete
5. Move to task 204 (implementation)
6. Continue pattern for remaining 24 tasks

## Progress Summary

**Completed this session:**
- ✅ Task 209 (Batch Mode tests) - 5/12 tests passing with mocks
- 🔄 Task 203 (Context Caching) - Structure designed, implementation next

**Remaining 25 tasks** follow same pattern:
- Test task (write test suite)
- Implementation task (make tests pass)
- Refactor task (optimize)

**Total Progress:** 1/27 tasks complete, 26 remaining (all planned with specifications)