Skip to content

Improve custom provider compatibility and agent concurrency#107

Open
cube1345 wants to merge 2 commits into
MINT-SJTU:mainfrom
cube1345:codex-custom-provider-session-lock
Open

Improve custom provider compatibility and agent concurrency#107
cube1345 wants to merge 2 commits into
MINT-SJTU:mainfrom
cube1345:codex-custom-provider-session-lock

Conversation

@cube1345
Copy link
Copy Markdown

Summary

  • Improve the direct OpenAI-compatible custom provider with stable session affinity, configurable extra headers, request timeouts, clearer error classification, and compatibility retries for unsupported reasoning_effort / tool_choice parameters.
  • Replace the agent loop's global processing lock with per-session locks so different sessions can run concurrently while preserving message ordering within the same session.
  • Add structured JSON tool errors with trace IDs for easier debugging.
  • Keep CLI status/startup offline-friendly by forcing LiteLLM to use its local model cost map.

Tests

  • env -u ALL_PROXY -u HTTP_PROXY -u HTTPS_PROXY -u all_proxy -u http_proxy -u https_proxy PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 UV_CACHE_DIR=/tmp/uv-cache uv run pytest -p pytest_asyncio.plugin tests/test_provider_factory.py tests/test_task_cancel.py tests/test_tool_validation.py tests/test_config_migration.py

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