ccproxy-api 0.2.5__tar.gz → 0.2.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/PKG-INFO +1 -1
- ccproxy_api-0.2.7/ccproxy/core/_version.py +24 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/llms/formatters/anthropic_to_openai/_helpers.py +30 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/llms/formatters/anthropic_to_openai/streams.py +6 -5
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/llms/formatters/openai_to_anthropic/_helpers.py +0 -12
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/llms/formatters/openai_to_openai/requests.py +53 -35
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/llms/formatters/openai_to_openai/streams.py +10 -5
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/llms/formatters/utils.py +26 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/llms/models/openai.py +12 -1
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/claude_api/adapter.py +40 -0
- ccproxy_api-0.2.5/ccproxy/core/_version.py +0 -34
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/.gitignore +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/LICENSE +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/README.md +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/__main__.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/api/__init__.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/api/app.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/api/bootstrap.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/api/decorators.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/api/dependencies.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/api/format_validation.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/api/middleware/__init__.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/api/middleware/cors.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/api/middleware/errors.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/api/middleware/hooks.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/api/middleware/normalize_headers.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/api/middleware/request_id.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/api/middleware/streaming_hooks.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/api/routes/__init__.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/api/routes/health.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/api/routes/plugins.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/auth/__init__.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/auth/bearer.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/auth/dependencies.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/auth/exceptions.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/auth/manager.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/auth/managers/__init__.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/auth/managers/base.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/auth/managers/base_enhanced.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/auth/managers/token_snapshot.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/auth/models/__init__.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/auth/models/base.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/auth/models/credentials.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/auth/oauth/__init__.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/auth/oauth/base.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/auth/oauth/cli_errors.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/auth/oauth/flows.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/auth/oauth/protocol.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/auth/oauth/registry.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/auth/oauth/router.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/auth/oauth/routes.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/auth/oauth/session.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/auth/oauth/templates.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/auth/storage/__init__.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/auth/storage/base.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/auth/storage/generic.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/cli/__init__.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/cli/_settings_help.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/cli/commands/__init__.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/cli/commands/auth.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/cli/commands/config/__init__.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/cli/commands/config/commands.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/cli/commands/config/schema_commands.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/cli/commands/plugins.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/cli/commands/serve.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/cli/commands/status.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/cli/decorators.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/cli/helpers.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/cli/main.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/cli/options/__init__.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/cli/options/claude_options.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/cli/options/core_options.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/cli/options/security_options.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/cli/options/server_options.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/config/__init__.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/config/core.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/config/env_generator.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/config/runtime.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/config/security.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/config/settings.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/config/toml_generator.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/config/utils.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/core/__init__.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/core/async_task_manager.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/core/async_utils.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/core/auth/__init__.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/core/constants.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/core/errors.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/core/id_utils.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/core/interfaces.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/core/logging.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/core/middleware.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/core/plugins/__init__.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/core/plugins/cli_discovery.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/core/plugins/declaration.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/core/plugins/discovery.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/core/plugins/factories.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/core/plugins/hooks/__init__.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/core/plugins/hooks/base.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/core/plugins/hooks/events.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/core/plugins/hooks/implementations/__init__.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/core/plugins/hooks/implementations/formatters/__init__.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/core/plugins/hooks/implementations/formatters/json.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/core/plugins/hooks/implementations/formatters/raw.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/core/plugins/hooks/implementations/http_tracer.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/core/plugins/hooks/layers.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/core/plugins/hooks/manager.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/core/plugins/hooks/registry.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/core/plugins/hooks/thread_manager.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/core/plugins/hooks/types.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/core/plugins/interfaces.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/core/plugins/loader.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/core/plugins/middleware.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/core/plugins/models.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/core/plugins/protocol.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/core/plugins/runtime.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/core/request_context.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/core/status_report.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/core/system.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/core/transformers.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/core/types.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/data/claude_headers_fallback.json +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/data/codex_headers_fallback.json +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/http/__init__.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/http/base.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/http/client.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/http/hooks.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/http/pool.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/llms/formatters/__init__.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/llms/formatters/anthropic_to_openai/__init__.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/llms/formatters/anthropic_to_openai/errors.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/llms/formatters/anthropic_to_openai/requests.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/llms/formatters/anthropic_to_openai/responses.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/llms/formatters/base.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/llms/formatters/base_model.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/llms/formatters/common/__init__.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/llms/formatters/common/identifiers.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/llms/formatters/common/streams.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/llms/formatters/common/thinking.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/llms/formatters/common/usage.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/llms/formatters/constants.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/llms/formatters/context.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/llms/formatters/mapping.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/llms/formatters/openai_to_anthropic/__init__.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/llms/formatters/openai_to_anthropic/errors.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/llms/formatters/openai_to_anthropic/requests.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/llms/formatters/openai_to_anthropic/responses.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/llms/formatters/openai_to_anthropic/streams.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/llms/formatters/openai_to_openai/__init__.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/llms/formatters/openai_to_openai/_helpers.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/llms/formatters/openai_to_openai/errors.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/llms/formatters/openai_to_openai/responses.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/llms/models/__init__.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/llms/models/anthropic.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/llms/streaming/__init__.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/llms/streaming/accumulators.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/llms/streaming/formatters.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/llms/streaming/processors.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/models/__init__.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/models/detection.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/models/provider.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/access_log/README.md +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/access_log/__init__.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/access_log/config.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/access_log/formatter.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/access_log/hook.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/access_log/logger.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/access_log/plugin.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/access_log/writer.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/analytics/README.md +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/analytics/__init__.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/analytics/config.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/analytics/ingest.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/analytics/models.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/analytics/plugin.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/analytics/routes.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/analytics/service.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/claude_api/README.md +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/claude_api/__init__.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/claude_api/config.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/claude_api/detection_service.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/claude_api/health.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/claude_api/hooks.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/claude_api/models.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/claude_api/plugin.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/claude_api/routes.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/claude_api/streaming_metrics.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/claude_api/tasks.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/claude_sdk/README.md +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/claude_sdk/__init__.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/claude_sdk/adapter.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/claude_sdk/auth.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/claude_sdk/client.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/claude_sdk/config.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/claude_sdk/converter.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/claude_sdk/detection_service.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/claude_sdk/exceptions.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/claude_sdk/handler.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/claude_sdk/health.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/claude_sdk/hooks.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/claude_sdk/manager.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/claude_sdk/message_queue.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/claude_sdk/models.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/claude_sdk/options.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/claude_sdk/parser.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/claude_sdk/plugin.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/claude_sdk/routes.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/claude_sdk/session_client.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/claude_sdk/session_pool.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/claude_sdk/stream_handle.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/claude_sdk/stream_worker.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/claude_sdk/streaming.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/claude_sdk/tasks.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/claude_shared/README.md +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/claude_shared/__init__.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/claude_shared/model_defaults.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/codex/README.md +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/codex/__init__.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/codex/adapter.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/codex/config.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/codex/detection_service.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/codex/health.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/codex/hooks.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/codex/model_defaults.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/codex/models.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/codex/plugin.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/codex/routes.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/codex/streaming_metrics.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/codex/tasks.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/codex/utils/__init__.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/codex/utils/sse_parser.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/command_replay/README.md +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/command_replay/__init__.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/command_replay/config.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/command_replay/formatter.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/command_replay/hook.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/command_replay/plugin.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/copilot/README.md +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/copilot/__init__.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/copilot/adapter.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/copilot/config.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/copilot/data/copilot_fallback.json +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/copilot/detection_service.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/copilot/manager.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/copilot/model_defaults.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/copilot/models.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/copilot/oauth/__init__.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/copilot/oauth/client.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/copilot/oauth/models.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/copilot/oauth/provider.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/copilot/oauth/storage.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/copilot/plugin.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/copilot/routes.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/credential_balancer/README.md +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/credential_balancer/__init__.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/credential_balancer/config.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/credential_balancer/factory.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/credential_balancer/hook.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/credential_balancer/manager.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/credential_balancer/plugin.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/dashboard/README.md +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/dashboard/__init__.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/dashboard/config.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/dashboard/plugin.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/dashboard/routes.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/docker/README.md +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/docker/__init__.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/docker/adapter.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/docker/config.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/docker/docker_path.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/docker/middleware.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/docker/models.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/docker/plugin.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/docker/protocol.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/docker/stream_process.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/docker/validators.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/duckdb_storage/README.md +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/duckdb_storage/__init__.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/duckdb_storage/config.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/duckdb_storage/plugin.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/duckdb_storage/routes.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/duckdb_storage/storage.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/max_tokens/README.md +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/max_tokens/__init__.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/max_tokens/adapter.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/max_tokens/config.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/max_tokens/models.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/max_tokens/plugin.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/max_tokens/service.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/max_tokens/token_limits.json +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/metrics/README.md +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/metrics/__init__.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/metrics/collector.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/metrics/config.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/metrics/grafana/dashboards/ccproxy-dashboard.json +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/metrics/hook.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/metrics/plugin.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/metrics/pushgateway.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/metrics/routes.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/metrics/tasks.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/oauth_claude/README.md +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/oauth_claude/__init__.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/oauth_claude/client.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/oauth_claude/config.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/oauth_claude/manager.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/oauth_claude/models.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/oauth_claude/plugin.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/oauth_claude/provider.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/oauth_claude/storage.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/oauth_codex/README.md +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/oauth_codex/__init__.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/oauth_codex/client.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/oauth_codex/config.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/oauth_codex/manager.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/oauth_codex/models.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/oauth_codex/plugin.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/oauth_codex/provider.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/oauth_codex/storage.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/permissions/README.md +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/permissions/__init__.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/permissions/config.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/permissions/handlers/__init__.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/permissions/handlers/cli.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/permissions/handlers/protocol.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/permissions/handlers/terminal.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/permissions/mcp.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/permissions/models.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/permissions/plugin.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/permissions/routes.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/permissions/service.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/permissions/ui/__init__.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/permissions/ui/permission_handler_protocol.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/permissions/ui/terminal_permission_handler.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/pricing/README.md +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/pricing/__init__.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/pricing/cache.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/pricing/config.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/pricing/exceptions.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/pricing/loader.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/pricing/models.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/pricing/plugin.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/pricing/service.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/pricing/tasks.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/pricing/updater.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/pricing/utils.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/request_tracer/README.md +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/request_tracer/__init__.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/request_tracer/config.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/request_tracer/hook.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/plugins/request_tracer/plugin.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/scheduler/__init__.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/scheduler/core.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/scheduler/errors.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/scheduler/manager.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/scheduler/registry.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/scheduler/tasks.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/services/__init__.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/services/adapters/__init__.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/services/adapters/base.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/services/adapters/chain_composer.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/services/adapters/chain_validation.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/services/adapters/chat_accumulator.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/services/adapters/delta_utils.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/services/adapters/format_adapter.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/services/adapters/format_context.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/services/adapters/format_registry.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/services/adapters/http_adapter.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/services/adapters/mock_adapter.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/services/adapters/protocols.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/services/adapters/simple_converters.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/services/auth_registry.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/services/cache/__init__.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/services/cache/response_cache.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/services/cli_detection.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/services/config/__init__.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/services/config/proxy_configuration.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/services/container.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/services/factories.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/services/handler_config.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/services/interfaces.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/services/mocking/__init__.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/services/mocking/mock_handler.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/services/tracing/__init__.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/services/tracing/interfaces.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/services/tracing/null_tracer.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/streaming/__init__.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/streaming/buffer.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/streaming/deferred.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/streaming/handler.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/streaming/interfaces.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/streaming/simple_adapter.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/streaming/sse.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/streaming/sse_parser.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/templates/__init__.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/templates/plugin_scaffold.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/testing/__init__.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/testing/config.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/testing/content_generation.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/testing/endpoints/__init__.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/testing/endpoints/cli.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/testing/endpoints/config.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/testing/endpoints/console.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/testing/endpoints/models.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/testing/endpoints/runner.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/testing/endpoints/tools.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/testing/mock_responses.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/testing/response_handlers.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/testing/scenarios.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/utils/__init__.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/utils/binary_resolver.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/utils/caching.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/utils/cli_logging.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/utils/command_line.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/utils/headers.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/utils/id_generator.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/utils/model_mapper.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/utils/startup_helpers.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/utils/version_checker.py +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/examples/README.md +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/pyproject.toml +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/tests/factories/README.md +0 -0
- {ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/tests/fixtures/README.md +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ccproxy-api
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.7
|
|
4
4
|
Summary: API server that provides an Anthropic and OpenAI compatible interface over Claude Code, allowing to use your Claude OAuth account or over the API.
|
|
5
5
|
License-File: LICENSE
|
|
6
6
|
Requires-Python: >=3.11
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# file generated by vcs-versioning
|
|
2
|
+
# don't change, don't track in version control
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
__all__ = [
|
|
6
|
+
"__version__",
|
|
7
|
+
"__version_tuple__",
|
|
8
|
+
"version",
|
|
9
|
+
"version_tuple",
|
|
10
|
+
"__commit_id__",
|
|
11
|
+
"commit_id",
|
|
12
|
+
]
|
|
13
|
+
|
|
14
|
+
version: str
|
|
15
|
+
__version__: str
|
|
16
|
+
__version_tuple__: tuple[int | str, ...]
|
|
17
|
+
version_tuple: tuple[int | str, ...]
|
|
18
|
+
commit_id: str | None
|
|
19
|
+
__commit_id__: str | None
|
|
20
|
+
|
|
21
|
+
__version__ = version = '0.2.7'
|
|
22
|
+
__version_tuple__ = version_tuple = (0, 2, 7)
|
|
23
|
+
|
|
24
|
+
__commit_id__ = commit_id = None
|
{ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/llms/formatters/anthropic_to_openai/_helpers.py
RENAMED
|
@@ -42,3 +42,33 @@ def build_openai_tool_call(
|
|
|
42
42
|
arguments=str(args_str),
|
|
43
43
|
),
|
|
44
44
|
)
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def build_openai_tool_call_chunk(
|
|
48
|
+
*,
|
|
49
|
+
index: int,
|
|
50
|
+
tool_id: str | None,
|
|
51
|
+
tool_name: str | None,
|
|
52
|
+
tool_input: Any,
|
|
53
|
+
arguments: Any = None,
|
|
54
|
+
fallback_index: int = 0,
|
|
55
|
+
) -> openai_models.ToolCallChunk:
|
|
56
|
+
args_str = (
|
|
57
|
+
arguments
|
|
58
|
+
if isinstance(arguments, str) and arguments
|
|
59
|
+
else serialize_tool_arguments(tool_input)
|
|
60
|
+
)
|
|
61
|
+
call_id = (
|
|
62
|
+
tool_id if isinstance(tool_id, str) and tool_id else f"call_{fallback_index}"
|
|
63
|
+
)
|
|
64
|
+
name = tool_name if isinstance(tool_name, str) and tool_name else "function"
|
|
65
|
+
|
|
66
|
+
return openai_models.ToolCallChunk(
|
|
67
|
+
index=index,
|
|
68
|
+
id=str(call_id),
|
|
69
|
+
type="function",
|
|
70
|
+
function=openai_models.FunctionCall(
|
|
71
|
+
name=str(name),
|
|
72
|
+
arguments=str(args_str),
|
|
73
|
+
),
|
|
74
|
+
)
|
{ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/llms/formatters/anthropic_to_openai/streams.py
RENAMED
|
@@ -27,7 +27,7 @@ from ccproxy.llms.models import anthropic as anthropic_models
|
|
|
27
27
|
from ccproxy.llms.models import openai as openai_models
|
|
28
28
|
from ccproxy.llms.streaming.accumulators import ClaudeAccumulator
|
|
29
29
|
|
|
30
|
-
from ._helpers import
|
|
30
|
+
from ._helpers import build_openai_tool_call_chunk
|
|
31
31
|
from .requests import _build_responses_payload_from_anthropic_request
|
|
32
32
|
from .responses import convert__anthropic_usage_to_openai_responses__usage
|
|
33
33
|
|
|
@@ -88,10 +88,10 @@ def _anthropic_delta_to_text(
|
|
|
88
88
|
return None
|
|
89
89
|
|
|
90
90
|
|
|
91
|
-
def
|
|
91
|
+
def _build_openai_tool_call_chunk(
|
|
92
92
|
accumulator: ClaudeAccumulator,
|
|
93
93
|
block_index: int,
|
|
94
|
-
) -> openai_models.
|
|
94
|
+
) -> openai_models.ToolCallChunk | None:
|
|
95
95
|
for tool_call in accumulator.get_complete_tool_calls():
|
|
96
96
|
if tool_call.get("index") != block_index:
|
|
97
97
|
continue
|
|
@@ -102,7 +102,8 @@ def _build_openai_tool_call(
|
|
|
102
102
|
tool_name = function_payload.get("name") or tool_call.get("name")
|
|
103
103
|
arguments = function_payload.get("arguments")
|
|
104
104
|
|
|
105
|
-
return
|
|
105
|
+
return build_openai_tool_call_chunk(
|
|
106
|
+
index=tool_call.get("index", block_index),
|
|
106
107
|
tool_id=tool_call.get("id"),
|
|
107
108
|
tool_name=tool_name,
|
|
108
109
|
tool_input=tool_call.get("input", {}),
|
|
@@ -1413,7 +1414,7 @@ class AnthropicToOpenAIChatStreamAdapter:
|
|
|
1413
1414
|
continue
|
|
1414
1415
|
if block_index in emitted_tool_indices:
|
|
1415
1416
|
continue
|
|
1416
|
-
tool_call =
|
|
1417
|
+
tool_call = _build_openai_tool_call_chunk(accumulator, block_index)
|
|
1417
1418
|
if tool_call is None:
|
|
1418
1419
|
continue
|
|
1419
1420
|
emitted_tool_indices.add(block_index)
|
{ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/llms/formatters/openai_to_anthropic/_helpers.py
RENAMED
|
@@ -63,17 +63,6 @@ def _normalize_text_and_images(
|
|
|
63
63
|
return text_parts, image_blocks
|
|
64
64
|
|
|
65
65
|
|
|
66
|
-
def _stringify_content(content: Any) -> str:
|
|
67
|
-
if content is None:
|
|
68
|
-
return ""
|
|
69
|
-
if isinstance(content, str):
|
|
70
|
-
return content
|
|
71
|
-
if isinstance(content, list):
|
|
72
|
-
text_parts, _ = _normalize_text_and_images(content)
|
|
73
|
-
return " ".join(text_parts)
|
|
74
|
-
return str(content)
|
|
75
|
-
|
|
76
|
-
|
|
77
66
|
def _coerce_system_content(content: Any) -> str | None:
|
|
78
67
|
if isinstance(content, str):
|
|
79
68
|
return content
|
|
@@ -134,7 +123,6 @@ def _build_assistant_blocks(
|
|
|
134
123
|
__all__ = [
|
|
135
124
|
"_to_mapping",
|
|
136
125
|
"_normalize_text_and_images",
|
|
137
|
-
"_stringify_content",
|
|
138
126
|
"_coerce_system_content",
|
|
139
127
|
"_build_user_blocks",
|
|
140
128
|
"_build_assistant_blocks",
|
{ccproxy_api-0.2.5 → ccproxy_api-0.2.7}/ccproxy/llms/formatters/openai_to_openai/requests.py
RENAMED
|
@@ -12,6 +12,7 @@ from ccproxy.llms.formatters.context import (
|
|
|
12
12
|
register_request,
|
|
13
13
|
register_request_tools,
|
|
14
14
|
)
|
|
15
|
+
from ccproxy.llms.formatters.utils import stringify_content
|
|
15
16
|
from ccproxy.llms.models import openai as openai_models
|
|
16
17
|
|
|
17
18
|
from ._helpers import (
|
|
@@ -240,42 +241,59 @@ def _build_responses_payload_from_chat_request(
|
|
|
240
241
|
if request.max_completion_tokens is not None:
|
|
241
242
|
payload_data["max_output_tokens"] = int(request.max_completion_tokens)
|
|
242
243
|
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
244
|
+
# Convert ALL chat messages to Responses API input items.
|
|
245
|
+
# This preserves the full conversation history including tool calls and results.
|
|
246
|
+
input_items: list[dict[str, Any]] = []
|
|
247
|
+
|
|
248
|
+
for msg in request.messages or []:
|
|
249
|
+
role = msg.role
|
|
250
|
+
content = msg.content
|
|
251
|
+
|
|
252
|
+
if role in ("system", "developer"):
|
|
246
253
|
continue
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
254
|
+
|
|
255
|
+
if role == "user":
|
|
256
|
+
text = stringify_content(content)
|
|
257
|
+
if text:
|
|
258
|
+
input_items.append(
|
|
259
|
+
{
|
|
260
|
+
"type": "message",
|
|
261
|
+
"role": "user",
|
|
262
|
+
"content": [{"type": "input_text", "text": text}],
|
|
263
|
+
}
|
|
264
|
+
)
|
|
265
|
+
|
|
266
|
+
elif role == "assistant":
|
|
267
|
+
if content:
|
|
268
|
+
input_items.append(
|
|
269
|
+
{
|
|
270
|
+
"type": "message",
|
|
271
|
+
"role": "assistant",
|
|
272
|
+
"content": [{"type": "output_text", "text": str(content)}],
|
|
273
|
+
}
|
|
274
|
+
)
|
|
275
|
+
if msg.tool_calls:
|
|
276
|
+
for tc in msg.tool_calls:
|
|
277
|
+
input_items.append(
|
|
278
|
+
{
|
|
279
|
+
"type": "function_call",
|
|
280
|
+
"id": tc.id,
|
|
281
|
+
"call_id": tc.id,
|
|
282
|
+
"name": tc.function.name,
|
|
283
|
+
"arguments": tc.function.arguments,
|
|
284
|
+
}
|
|
285
|
+
)
|
|
286
|
+
|
|
287
|
+
elif role == "tool":
|
|
288
|
+
input_items.append(
|
|
289
|
+
{
|
|
290
|
+
"type": "function_call_output",
|
|
291
|
+
"call_id": msg.tool_call_id or "",
|
|
292
|
+
"output": str(content) if content else "",
|
|
293
|
+
}
|
|
294
|
+
)
|
|
295
|
+
|
|
296
|
+
payload_data["input"] = input_items
|
|
279
297
|
|
|
280
298
|
instruction_segments = _collect_chat_instruction_segments(request.messages)
|
|
281
299
|
instructions_text = "\n\n".join(
|
|
@@ -389,7 +389,8 @@ class OpenAIResponsesToChatStreamAdapter:
|
|
|
389
389
|
|
|
390
390
|
# Emit initial tool call chunk to surface id/name information
|
|
391
391
|
if not state.initial_emitted:
|
|
392
|
-
tool_call = openai_models.
|
|
392
|
+
tool_call = openai_models.ToolCallChunk(
|
|
393
|
+
index=state.index,
|
|
393
394
|
id=state.id,
|
|
394
395
|
type="function",
|
|
395
396
|
function=openai_models.FunctionCall(
|
|
@@ -442,7 +443,8 @@ class OpenAIResponsesToChatStreamAdapter:
|
|
|
442
443
|
state.name = guessed
|
|
443
444
|
|
|
444
445
|
if state.initial_emitted:
|
|
445
|
-
tool_call = openai_models.
|
|
446
|
+
tool_call = openai_models.ToolCallChunk(
|
|
447
|
+
index=state.index,
|
|
446
448
|
id=state.id,
|
|
447
449
|
type="function",
|
|
448
450
|
function=openai_models.FunctionCall(
|
|
@@ -494,7 +496,8 @@ class OpenAIResponsesToChatStreamAdapter:
|
|
|
494
496
|
if guessed:
|
|
495
497
|
state.name = guessed
|
|
496
498
|
|
|
497
|
-
tool_call = openai_models.
|
|
499
|
+
tool_call = openai_models.ToolCallChunk(
|
|
500
|
+
index=state.index,
|
|
498
501
|
id=state.id,
|
|
499
502
|
type="function",
|
|
500
503
|
function=openai_models.FunctionCall(
|
|
@@ -586,7 +589,8 @@ class OpenAIResponsesToChatStreamAdapter:
|
|
|
586
589
|
if guessed:
|
|
587
590
|
state.name = guessed
|
|
588
591
|
if not state.arguments_emitted:
|
|
589
|
-
tool_call = openai_models.
|
|
592
|
+
tool_call = openai_models.ToolCallChunk(
|
|
593
|
+
index=state.index,
|
|
590
594
|
id=state.id,
|
|
591
595
|
type="function",
|
|
592
596
|
function=openai_models.FunctionCall(
|
|
@@ -616,7 +620,8 @@ class OpenAIResponsesToChatStreamAdapter:
|
|
|
616
620
|
|
|
617
621
|
# Emit a patch chunk if the name was never surfaced earlier
|
|
618
622
|
if state.name and not state.name_emitted:
|
|
619
|
-
tool_call = openai_models.
|
|
623
|
+
tool_call = openai_models.ToolCallChunk(
|
|
624
|
+
index=state.index,
|
|
620
625
|
id=state.id,
|
|
621
626
|
type="function",
|
|
622
627
|
function=openai_models.FunctionCall(
|
|
@@ -294,6 +294,31 @@ def strict_parse_tool_arguments(
|
|
|
294
294
|
return {"arguments": str(arguments)}
|
|
295
295
|
|
|
296
296
|
|
|
297
|
+
def stringify_content(content: Any) -> str:
|
|
298
|
+
"""Extract plain text from message content (str, list of content parts, or None)."""
|
|
299
|
+
if content is None:
|
|
300
|
+
return ""
|
|
301
|
+
if isinstance(content, str):
|
|
302
|
+
return content
|
|
303
|
+
if isinstance(content, list):
|
|
304
|
+
texts: list[str] = []
|
|
305
|
+
for part in content:
|
|
306
|
+
if isinstance(part, dict):
|
|
307
|
+
if part.get("type") in {"text", "input_text"}:
|
|
308
|
+
t = part.get("text")
|
|
309
|
+
if isinstance(t, str) and t:
|
|
310
|
+
texts.append(t)
|
|
311
|
+
elif hasattr(part, "type") and getattr(part, "type", None) in {
|
|
312
|
+
"text",
|
|
313
|
+
"input_text",
|
|
314
|
+
}:
|
|
315
|
+
t = getattr(part, "text", None)
|
|
316
|
+
if isinstance(t, str) and t:
|
|
317
|
+
texts.append(t)
|
|
318
|
+
return " ".join(texts)
|
|
319
|
+
return str(content)
|
|
320
|
+
|
|
321
|
+
|
|
297
322
|
__all__ = [
|
|
298
323
|
"UsageSnapshot",
|
|
299
324
|
"anthropic_usage_snapshot",
|
|
@@ -303,4 +328,5 @@ __all__ = [
|
|
|
303
328
|
"build_obfuscation_token",
|
|
304
329
|
"map_openai_finish_to_anthropic_stop",
|
|
305
330
|
"strict_parse_tool_arguments",
|
|
331
|
+
"stringify_content",
|
|
306
332
|
]
|
|
@@ -185,11 +185,22 @@ class FunctionCall(LlmBaseModel):
|
|
|
185
185
|
|
|
186
186
|
|
|
187
187
|
class ToolCall(LlmBaseModel):
|
|
188
|
+
"""Non-streaming tool call (ChatCompletionMessageToolCall)."""
|
|
189
|
+
|
|
188
190
|
id: str
|
|
189
191
|
type: Literal["function"] = Field(default="function")
|
|
190
192
|
function: FunctionCall
|
|
191
193
|
|
|
192
194
|
|
|
195
|
+
class ToolCallChunk(LlmBaseModel):
|
|
196
|
+
"""Streaming tool call delta (ChoiceDeltaToolCall)."""
|
|
197
|
+
|
|
198
|
+
index: int
|
|
199
|
+
id: str | None = None
|
|
200
|
+
type: Literal["function"] | None = None
|
|
201
|
+
function: FunctionCall | None = None
|
|
202
|
+
|
|
203
|
+
|
|
193
204
|
class ChatMessage(LlmBaseModel):
|
|
194
205
|
"""
|
|
195
206
|
A message within a chat conversation.
|
|
@@ -309,7 +320,7 @@ class ChatCompletionResponse(LlmBaseModel):
|
|
|
309
320
|
class DeltaMessage(LlmBaseModel):
|
|
310
321
|
role: Literal["assistant"] | None = None
|
|
311
322
|
content: str | list[Any] | None = None
|
|
312
|
-
tool_calls: list[
|
|
323
|
+
tool_calls: list[ToolCallChunk] | None = None
|
|
313
324
|
audio: dict[str, Any] | None = None
|
|
314
325
|
reasoning: ResponseMessageReasoning | None = None
|
|
315
326
|
|
|
@@ -12,6 +12,7 @@ from ccproxy.core.plugins.interfaces import (
|
|
|
12
12
|
DetectionServiceProtocol,
|
|
13
13
|
TokenManagerProtocol,
|
|
14
14
|
)
|
|
15
|
+
from ccproxy.llms.formatters.utils import strict_parse_tool_arguments
|
|
15
16
|
from ccproxy.services.adapters.http_adapter import BaseHTTPAdapter
|
|
16
17
|
from ccproxy.utils.headers import (
|
|
17
18
|
extract_response_headers,
|
|
@@ -304,6 +305,7 @@ class ClaudeAPIAdapter(BaseHTTPAdapter):
|
|
|
304
305
|
continue
|
|
305
306
|
role = msg.get("role")
|
|
306
307
|
content = msg.get("content", "")
|
|
308
|
+
tool_calls = msg.get("tool_calls")
|
|
307
309
|
|
|
308
310
|
if role == "system":
|
|
309
311
|
block = self._normalize_text_block(content)
|
|
@@ -314,6 +316,44 @@ class ClaudeAPIAdapter(BaseHTTPAdapter):
|
|
|
314
316
|
system_blocks.append(block)
|
|
315
317
|
continue
|
|
316
318
|
|
|
319
|
+
if role == "assistant" and tool_calls:
|
|
320
|
+
# Convert OpenAI tool_calls to Anthropic tool_use blocks
|
|
321
|
+
blocks: list[dict[str, Any]] = []
|
|
322
|
+
if content:
|
|
323
|
+
blocks.append({"type": "text", "text": str(content)})
|
|
324
|
+
for tc in tool_calls:
|
|
325
|
+
func_info = tc.get("function", {})
|
|
326
|
+
tool_input = strict_parse_tool_arguments(
|
|
327
|
+
func_info.get("arguments", "{}")
|
|
328
|
+
)
|
|
329
|
+
blocks.append(
|
|
330
|
+
{
|
|
331
|
+
"type": "tool_use",
|
|
332
|
+
"id": tc.get("id", ""),
|
|
333
|
+
"name": func_info.get("name", ""),
|
|
334
|
+
"input": tool_input,
|
|
335
|
+
}
|
|
336
|
+
)
|
|
337
|
+
anthropic_messages.append({"role": "assistant", "content": blocks})
|
|
338
|
+
continue
|
|
339
|
+
|
|
340
|
+
if role == "tool":
|
|
341
|
+
# Convert OpenAI tool result to Anthropic tool_result block
|
|
342
|
+
tool_call_id = msg.get("tool_call_id", "")
|
|
343
|
+
anthropic_messages.append(
|
|
344
|
+
{
|
|
345
|
+
"role": "user",
|
|
346
|
+
"content": [
|
|
347
|
+
{
|
|
348
|
+
"type": "tool_result",
|
|
349
|
+
"tool_use_id": tool_call_id,
|
|
350
|
+
"content": str(content) if content else "",
|
|
351
|
+
}
|
|
352
|
+
],
|
|
353
|
+
}
|
|
354
|
+
)
|
|
355
|
+
continue
|
|
356
|
+
|
|
317
357
|
block = self._normalize_text_block(content)
|
|
318
358
|
if block is None:
|
|
319
359
|
block = []
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
# file generated by setuptools-scm
|
|
2
|
-
# don't change, don't track in version control
|
|
3
|
-
|
|
4
|
-
__all__ = [
|
|
5
|
-
"__version__",
|
|
6
|
-
"__version_tuple__",
|
|
7
|
-
"version",
|
|
8
|
-
"version_tuple",
|
|
9
|
-
"__commit_id__",
|
|
10
|
-
"commit_id",
|
|
11
|
-
]
|
|
12
|
-
|
|
13
|
-
TYPE_CHECKING = False
|
|
14
|
-
if TYPE_CHECKING:
|
|
15
|
-
from typing import Tuple
|
|
16
|
-
from typing import Union
|
|
17
|
-
|
|
18
|
-
VERSION_TUPLE = Tuple[Union[int, str], ...]
|
|
19
|
-
COMMIT_ID = Union[str, None]
|
|
20
|
-
else:
|
|
21
|
-
VERSION_TUPLE = object
|
|
22
|
-
COMMIT_ID = object
|
|
23
|
-
|
|
24
|
-
version: str
|
|
25
|
-
__version__: str
|
|
26
|
-
__version_tuple__: VERSION_TUPLE
|
|
27
|
-
version_tuple: VERSION_TUPLE
|
|
28
|
-
commit_id: COMMIT_ID
|
|
29
|
-
__commit_id__: COMMIT_ID
|
|
30
|
-
|
|
31
|
-
__version__ = version = '0.2.5'
|
|
32
|
-
__version_tuple__ = version_tuple = (0, 2, 5)
|
|
33
|
-
|
|
34
|
-
__commit_id__ = commit_id = None
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|