Skip to content

hotfix v2.2.2#3362

Merged
Dallas98 merged 5 commits into
mainfrom
develop
Jul 2, 2026
Merged

hotfix v2.2.2#3362
Dallas98 merged 5 commits into
mainfrom
develop

Conversation

@Dallas98

@Dallas98 Dallas98 commented Jul 2, 2026

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings July 2, 2026 09:48
@Dallas98 Dallas98 requested a review from WMC001 as a code owner July 2, 2026 09:48
@Dallas98 Dallas98 changed the title fix v2.2.2 hotfix v2.2.2 Jul 2, 2026
@Dallas98 Dallas98 merged commit c6c7f2f into main Jul 2, 2026
11 of 12 checks passed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates Nexent’s versioning, streaming message buffering, and DashScope model classification logic, alongside frontend UUID generation hardening and substantial test expansions to cover the new/updated behaviors.

Changes:

  • Resolve APP_VERSION dynamically from VERSION files (env/container/local) instead of a hardcoded constant, with dedicated unit tests.
  • Improve MessageObserver token buffering by flushing overflow as accumulated chunks to reduce message fragmentation, with new edge/overflow tests.
  • Rework DashScope model classification to support multi-bucket capability tagging (e.g., one model appearing in vlm, vlm3, and llm), plus frontend updates to request vlm2/vlm3 directly.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
backend/consts/const.py Adds version candidate enumeration + resolver and uses it to set APP_VERSION at import time.
test/backend/consts/test_app_version.py Adds unit tests for the new version-resolution helpers.
sdk/nexent/core/utils/observer.py Changes buffer-overflow behavior to flush accumulated content rather than one token at a time.
test/sdk/core/utils/test_observer.py Adds extensive tests for observer overflow, fragmentation, flush, and edge cases.
backend/services/providers/dashscope_provider.py Adds helper functions and changes model classification to allow multi-bucket membership.
test/backend/services/providers/test_dashscope_provider.py Rewrites/expands provider tests to validate helper functions, new classification rules, pagination, and retry logic.
backend/database/conversation_db.py Sorts units by unit_index when present to normalize ordering.
test/backend/database/test_conversation_db.py Adds many tests to cover previously uncovered conversation_db branches (filters, parsing, empty cases, unit sorting).
sdk/nexent/core/agents/agent_model.py Changes AgentVerificationConfig.enabled default to False.
test/sdk/core/agents/test_agent_model.py Updates verification-config default expectations to match new default.
frontend/lib/utils.ts Adds safeUUID() helper with crypto.randomUUID() primary + non-secure fallback.
frontend/app/[locale]/chat/components/chatInput.tsx Uses safeUUID() instead of direct crypto.randomUUID() for file IDs.
frontend/app/[locale]/agents/components/agentInfo/DebugConfig.tsx Uses safeUUID() instead of direct crypto.randomUUID() for file IDs.
frontend/hooks/model/useDashscopeModelList.ts Stops mapping vlm2/vlm3 to vlm when building DashScope model_type requests.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +213 to +215
# Fallback to llm when no specialized modality is present
if 'Text' in req_mod or 'Text' in res_mod:
cleaned_model.update({"model_tag": "chat", "model_type": "llm"})
categorized_models['chat'].append(cleaned_model)
llm_model = cleaned_model.copy()
Comment thread backend/consts/const.py
Comment on lines +513 to +518
"""Return the parsed version string from ``candidate`` or ``None``.

Reads only the first non-blank line and strips surrounding whitespace.
Returns ``None`` if the file is missing, unreadable, or its first line
is empty after trimming.
"""
Comment on lines +115 to +120
def test_override_must_be_non_empty(self, monkeypatch):
# ``os.getenv`` with no default returns ``""`` when the var is set
# but empty; the helper should *not* treat that as a candidate.
monkeypatch.setenv("APP_VERSION_FILE", "")
candidates = [_str_path(p) for p in _collect_version_candidates()]
assert "/some/explicit/path" not in candidates
Comment on lines +858 to +862
# Should have processed content (mode behavior varies based on implementation)
# Just verify the observer doesn't crash
messages = observer.get_cached_message()
assert len(messages) >= 0

Comment on lines +196 to 198
# Multimodal / general-purpose types - non-exclusive, no continue.
# Each check is independent; one model can qualify for multiple buckets.
if _is_dashscope_image_generation_model(m_id, desc, req_mods, res_mods):
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.

5 participants