Skip to content

docs: add Gemini and Mistral observe() demos to observe_basic - #25

Merged
nagasatish007 merged 1 commit into
agentguard-ai:mainfrom
amanishimwe:docs/add-observe-gemini-mistral-example
Aug 6, 2026
Merged

docs: add Gemini and Mistral observe() demos to observe_basic#25
nagasatish007 merged 1 commit into
agentguard-ai:mainfrom
amanishimwe:docs/add-observe-gemini-mistral-example

Conversation

@amanishimwe

@amanishimwe amanishimwe commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Pull Request

Description

Extends examples/observe_basic.py with mock Gemini and Mistral observe(). No API key required. Shows cost tracking and freeze() / unfreeze() for each provider.
Fixes agentguard-ai/tealtiger#366

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Performance improvement
  • Code refactoring
  • Test improvements

Changes Made

  • Added mock Gemini client (generate_content + usage_metadata) and demo_gemini()
  • Added mock Mistral client (class name contains mistral, callable chat) and demo_mistral()
  • Updated module docstring and __main__ to run OpenAI, Anthropic, Gemini, and Mistral demos

Testing

Describe the tests you ran to verify your changes:

  • Unit tests pass (pytest)
  • Type checking passes (mypy src)
  • Linting passes (ruff check src tests)
  • Manual testing performed
  • Added new tests for new functionality

Confirmed all four demos print a response, cost summary, and freeze-block message.

Checklist

  • My code follows the project's code style
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published

Breaking Changes

None.

Screenshots (if applicable)

N/A — CLI example output only.

Additional Notes

  • Mocks follow provider detection in provider_detector.py (Gemini: generate_content; Mistral: class name + callable chat).
  • Example-only change; no SDK runtime behavior modified.
  • Branch: docs/add-observe-gemini-mistral-example

@amanishimwe

Copy link
Copy Markdown
Contributor Author

@nagasatish007, are there any issues with this PR that you would like me to address? Take note, the CLI issues are not introduced by my changes

@nagasatish007
nagasatish007 merged commit ae428e2 into agentguard-ai:main Aug 6, 2026
6 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[observe] Add observe() example for Anthropic Claude

2 participants