Skip to content

Fixed and Opt Charge Tests#1008

Merged
wzh1994 merged 5 commits intoLazyAGI:mainfrom
JingofXin:sxy/online_test
Feb 5, 2026
Merged

Fixed and Opt Charge Tests#1008
wzh1994 merged 5 commits intoLazyAGI:mainfrom
JingofXin:sxy/online_test

Conversation

@JingofXin
Copy link
Collaborator

📌 PR 内容 / PR Description

  • Replace the default model in the examples
  • Remove BASE_PATH tracking from all test cases marked as xfail
  • Delete redundant test cases
  • Resolve key loss caused by nested environment variables

✅ 变更类型 / Type of Change

  • 修复 Bug / Bug fix (non-breaking change that fixes an issue)
  • 新功能 / New feature (non-breaking change that adds functionality)
  • 重构 / Refactor (no functionality change, code structure optimized)
  • 重大变更 / Breaking change (fix or feature that would cause existing functionality to change)
  • 文档更新 / Documentation update (changes to docs only)
  • 性能优化 / Performance optimization

🧪 如何测试 / How Has This Been Tested?

Run CI

@JingofXin JingofXin requested review from a team as code owners February 4, 2026 07:58
@gemini-code-assist
Copy link

Summary of Changes

Hello @JingofXin, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request refines and optimizes the project's examples and charge tests. It updates the default models used in key example scripts, ensuring they reflect current configurations. The PR also significantly cleans up the test suite by removing unnecessary BASE_PATH tracking from xfail tests and eliminating redundant test cases. Furthermore, it improves the handling of environment variables within tests to prevent potential key loss, contributing to a more robust and maintainable codebase.

Highlights

  • Example Model Updates: The default models used in the multimodal_chatbot_online.py and rag_online.py examples have been updated to use more current or specific models/sources.
  • Test Configuration Simplification: The BASE_PATH tracking has been removed from pytest.mark.ignore_cache_on_change decorators across numerous xfail test cases, streamlining test configurations.
  • Redundant Test Case Removal: Several redundant online chat module test cases and their associated fixture have been deleted from test_example.py.
  • Environment Variable Handling Improvement: The logic for managing environment variables in test_example.py has been simplified, addressing potential key loss issues caused by nested environment variables.
Changelog
  • examples/multimodal_chatbot_online.py
    • Updated the default model for OnlineChatModule from 'glm-4v-flash' to 'SenseNova-V6-5-Pro' and changed the source from 'glm' to 'sensenova'.
  • examples/rag_online.py
    • Modified the OnlineEmbeddingModule for the reranker to explicitly set source="qwen".
  • tests/charge_tests/Models/test_chat.py
    • Removed BASE_PATH from pytest.mark.ignore_cache_on_change decorators for various chat model tests (doubao, glm, siliconflow, minimax, openai, deepseek, kimi, aiping, ppio).
    • Added @pytest.mark.xfail to test_doubao_chat.
  • tests/charge_tests/Models/test_embedding.py
    • Removed BASE_PATH from pytest.mark.ignore_cache_on_change decorators for several embedding model tests (glm, siliconflow, openai, aiping, doubao multimodal).
  • tests/charge_tests/Models/test_image_editing.py
    • Removed BASE_PATH from pytest.mark.ignore_cache_on_change decorators for image editing tests (doubao, siliconflow).
  • tests/charge_tests/Models/test_images_fusion.py
    • Removed BASE_PATH from pytest.mark.ignore_cache_on_change decorator for the siliconflow images fusion test.
  • tests/charge_tests/Models/test_rerank.py
    • Removed BASE_PATH from pytest.mark.ignore_cache_on_change decorators for rerank tests (siliconflow, aiping, glm, openai).
  • tests/charge_tests/Models/test_stt.py
    • Removed BASE_PATH from pytest.mark.ignore_cache_on_change decorator for the glm STT test.
  • tests/charge_tests/Models/test_text2image.py
    • Removed BASE_PATH from pytest.mark.ignore_cache_on_change decorators for text2image tests (doubao, siliconflow, glm, minimax, aiping).
  • tests/charge_tests/Models/test_tts.py
    • Removed BASE_PATH from pytest.mark.ignore_cache_on_change decorators for TTS tests (minimax, siliconflow).
  • tests/charge_tests/test_example.py
    • Removed the self.env_vars list and the associated logic for managing environment variables around tests, simplifying the test setup.
    • Changed the initial chat_history query in test_chat to a specific string: '不要发挥和扩展,请严格原样输出下面句子:Hello world.'.
    • Deleted the requestOnlineChatModule fixture and TestOnlineChatModule class, removing redundant online chat module tests.
Activity
  • JingofXin created this pull request to fix bugs and optimize charge tests.
  • The changes include updates to example configurations, removal of redundant test logic, and improvements to environment variable handling.
  • The author marked this as a bug fix and suggests running CI to test the changes.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request delivers several valuable fixes and cleanups. It updates default models in examples, removes redundant test cases, and refactors test decorators for failing tests to avoid unnecessary cache invalidations. A significant improvement is the removal of problematic environment variable manipulation in the test setup, which simplifies the test suite and resolves potential key management issues. The changes are logical, well-executed, and improve the codebase's maintainability.

@wzh1994 wzh1994 merged commit 12a456f into LazyAGI:main Feb 5, 2026
19 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.

2 participants