Adds flexible cassette matching that ignores system prompt changes
for o3 models, preventing CI failures when prompts are updated.
Changes:
- Semantic matching: Only compares model name, user question, and core params
- Ignores: System prompts, conversation memory instructions, metadata
- Prevents cassette breaks when prompts change between code versions
- Added comprehensive tests for semantic matching behavior
- Created maintenance documentation (tests/CASSETTE_MAINTENANCE.md)
This solves the CI failure where o3-pro test cassettes would break
whenever system prompts or conversation memory format changed.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Updated test_supported_models_aliases.py to reflect the removal of self-referencing aliases:
- Removed assertion for "o4-mini" in its own aliases (no longer self-referencing)
- Updated "o3-pro" alias test to use "o3pro" (normalized alias format)
- Fixed alias resolution test for o3pro -> o3-pro
These changes align with the fix for duplicate model listings in listmodels output.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Fixed issue where OpenAI models appeared twice in listmodels output by:
- Removing self-referencing aliases from OpenAI model definitions (e.g., "gpt-5" no longer includes "gpt-5" in its aliases)
- Adding filter in listmodels.py to skip aliases that match the model name
- Cleaned up inconsistent alias naming (o3-pro -> o3pro)
This ensures each model appears only once in the listing while preserving all useful aliases.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Extract restriction checking logic into reusable helper method
- Refactor validate_model_name to reduce code duplication
- Fix logging import by using existing module-level logger
- Clean up test file by removing print statement and main block
- All tests continue to pass after refactoring
- OpenAI provider now checks custom models registry for user configurations
- Custom models with supports_temperature=false no longer send temperature to API
- Fixes 400 errors for custom o3/gpt-5 models configured without temperature support
- Added comprehensive tests to verify the fix works correctly
- Maintains backward compatibility with built-in models
Fixes#245
Address code review feedback by creating ModelContext instance once
at the beginning of _consult_model method instead of creating it twice.
- Move ModelContext import to method beginning for better practice
- Create single ModelContext instance and reuse for both file processing
and temperature validation
- Remove redundant ModelContext creation on line 558
- Improve code clarity and efficiency as suggested by code review
Fixed runtime bug where _prepare_file_content_for_prompt was called
without required model_context parameter, causing RuntimeError when
processing requests with relevant_files.
- Create ModelContext instance with model_name in _consult_model method
- Pass model_context parameter to _prepare_file_content_for_prompt call
- Add comprehensive regression test to prevent future occurrences
- Maintain consensus tool's blinded design with independent model contexts
- Move dotenv_values import to top level with load_dotenv
- Fix logging sequence issue by deferring ZEN_MCP_FORCE_ENV_OVERRIDE logs until after logger configuration
- Apply Black formatting to ensure consistent code style
Add ZEN_MCP_FORCE_ENV_OVERRIDE configuration to control whether .env file values
override system environment variables. This prevents conflicts when multiple AI
tools pass different cached environment variables to the MCP server.
- Use dotenv_values() to read configuration from .env file only
- Apply conditional override based on configuration setting
- Add appropriate logging for transparency
- Update .env.example with detailed configuration documentation
- Maintains backward compatibility with default behavior (false)
- Fix ModelContext constructor call in consensus tool (remove invalid parameters)
- Refactor temperature pattern matching for better readability per code review
- All tests now passing (799/799 passed)
- Fix consensus tool hardcoded temperature=0.2 bypassing model capabilities
- Add intelligent temperature inference for unknown custom models
- Support multi-model collaboration (O3, Gemini, Claude, Mistral, DeepSeek)
- Only OpenAI O-series and DeepSeek reasoner models reject temperature
- Most reasoning models (Gemini Pro, Claude, Mistral) DO support temperature
- Comprehensive logging for temperature decisions and user guidance
Resolves: https://github.com/BeehiveInnovations/zen-mcp-server/issues/245
- Add GEMINI_BASE_URL configuration option in .env.example
- Implement custom endpoint support in GeminiModelProvider using HttpOptions
- Update registry to pass base_url parameter to Gemini provider
- Maintain backward compatibility - uses default Google endpoint when not configured
Disabled secondary tools by default (for new installations), updated README.md with instructions on how to enable these in .env
run-server.sh now displays disabled / enabled tools (when DISABLED_TOOLS is set)
Adding max token for consistency per review comment
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>