camel-ai 0.2.59__py3-none-any.whl → 0.2.82__py3-none-any.whl
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.
Potentially problematic release.
This version of camel-ai might be problematic. Click here for more details.
- camel/__init__.py +3 -3
- camel/agents/__init__.py +2 -2
- camel/agents/_types.py +9 -4
- camel/agents/_utils.py +40 -2
- camel/agents/base.py +2 -2
- camel/agents/chat_agent.py +5012 -902
- camel/agents/critic_agent.py +2 -2
- camel/agents/deductive_reasoner_agent.py +56 -56
- camel/agents/embodied_agent.py +2 -2
- camel/agents/knowledge_graph_agent.py +20 -20
- camel/agents/mcp_agent.py +39 -36
- camel/agents/multi_hop_generator_agent.py +3 -3
- camel/agents/programmed_agent_instruction.py +2 -2
- camel/agents/repo_agent.py +4 -3
- camel/agents/role_assignment_agent.py +2 -2
- camel/agents/search_agent.py +2 -2
- camel/agents/task_agent.py +2 -2
- camel/agents/tool_agents/__init__.py +2 -2
- camel/agents/tool_agents/base.py +2 -2
- camel/agents/tool_agents/hugging_face_tool_agent.py +3 -3
- camel/benchmarks/__init__.py +2 -2
- camel/benchmarks/apibank.py +5 -5
- camel/benchmarks/apibench.py +2 -2
- camel/benchmarks/base.py +2 -2
- camel/benchmarks/browsecomp.py +44 -33
- camel/benchmarks/gaia.py +17 -13
- camel/benchmarks/mock_website/README.md +94 -0
- camel/benchmarks/mock_website/mock_web.py +299 -0
- camel/benchmarks/mock_website/requirements.txt +3 -0
- camel/benchmarks/mock_website/shopping_mall/app.py +465 -0
- camel/benchmarks/mock_website/task.json +104 -0
- camel/benchmarks/nexus.py +3 -3
- camel/benchmarks/ragbench.py +2 -2
- camel/bots/__init__.py +2 -2
- camel/bots/discord/__init__.py +2 -2
- camel/bots/discord/discord_app.py +2 -2
- camel/bots/discord/discord_installation.py +2 -2
- camel/bots/discord/discord_store.py +3 -3
- camel/bots/slack/__init__.py +2 -2
- camel/bots/slack/models.py +4 -4
- camel/bots/slack/slack_app.py +2 -2
- camel/bots/telegram_bot.py +2 -2
- camel/configs/__init__.py +26 -2
- camel/configs/aihubmix_config.py +90 -0
- camel/configs/aiml_config.py +2 -2
- camel/configs/amd_config.py +70 -0
- camel/configs/anthropic_config.py +8 -7
- camel/configs/base_config.py +2 -2
- camel/configs/bedrock_config.py +5 -3
- camel/configs/cerebras_config.py +98 -0
- camel/configs/cohere_config.py +3 -3
- camel/configs/cometapi_config.py +106 -0
- camel/configs/crynux_config.py +94 -0
- camel/configs/deepseek_config.py +9 -8
- camel/configs/gemini_config.py +6 -4
- camel/configs/groq_config.py +6 -4
- camel/configs/internlm_config.py +6 -4
- camel/configs/litellm_config.py +2 -2
- camel/configs/lmstudio_config.py +6 -4
- camel/configs/minimax_config.py +95 -0
- camel/configs/mistral_config.py +3 -3
- camel/configs/modelscope_config.py +5 -3
- camel/configs/moonshot_config.py +2 -2
- camel/configs/nebius_config.py +105 -0
- camel/configs/netmind_config.py +2 -2
- camel/configs/novita_config.py +2 -2
- camel/configs/nvidia_config.py +2 -2
- camel/configs/ollama_config.py +2 -2
- camel/configs/openai_config.py +8 -3
- camel/configs/openrouter_config.py +6 -4
- camel/configs/ppio_config.py +2 -2
- camel/configs/qianfan_config.py +85 -0
- camel/configs/qwen_config.py +2 -2
- camel/configs/reka_config.py +3 -3
- camel/configs/samba_config.py +8 -6
- camel/configs/sglang_config.py +2 -2
- camel/configs/siliconflow_config.py +2 -2
- camel/configs/togetherai_config.py +2 -2
- camel/configs/vllm_config.py +4 -2
- camel/configs/watsonx_config.py +2 -2
- camel/configs/yi_config.py +6 -4
- camel/configs/zhipuai_config.py +6 -4
- camel/{data_collector → data_collectors}/__init__.py +2 -2
- camel/{data_collector → data_collectors}/alpaca_collector.py +19 -10
- camel/{data_collector → data_collectors}/base.py +2 -2
- camel/{data_collector → data_collectors}/sharegpt_collector.py +3 -3
- camel/datagen/__init__.py +2 -2
- camel/datagen/cot_datagen.py +32 -37
- camel/datagen/evol_instruct/__init__.py +2 -2
- camel/datagen/evol_instruct/evol_instruct.py +2 -2
- camel/datagen/evol_instruct/scorer.py +24 -25
- camel/datagen/evol_instruct/templates.py +48 -48
- camel/datagen/self_improving_cot.py +5 -5
- camel/datagen/self_instruct/__init__.py +2 -2
- camel/datagen/self_instruct/filter/__init__.py +2 -2
- camel/datagen/self_instruct/filter/filter_function.py +2 -2
- camel/datagen/self_instruct/filter/filter_registry.py +2 -2
- camel/datagen/self_instruct/filter/instruction_filter.py +2 -2
- camel/datagen/self_instruct/self_instruct.py +2 -2
- camel/datagen/self_instruct/templates.py +47 -47
- camel/datagen/source2synth/__init__.py +2 -2
- camel/datagen/source2synth/data_processor.py +2 -2
- camel/datagen/source2synth/models.py +2 -2
- camel/datagen/source2synth/user_data_processor_config.py +2 -2
- camel/datahubs/__init__.py +2 -2
- camel/datahubs/base.py +2 -2
- camel/datahubs/huggingface.py +2 -2
- camel/datahubs/models.py +2 -2
- camel/datasets/__init__.py +2 -2
- camel/datasets/base_generator.py +41 -12
- camel/datasets/few_shot_generator.py +18 -18
- camel/datasets/models.py +3 -3
- camel/datasets/self_instruct_generator.py +2 -2
- camel/datasets/static_dataset.py +152 -2
- camel/embeddings/__init__.py +2 -2
- camel/embeddings/azure_embedding.py +2 -2
- camel/embeddings/base.py +2 -2
- camel/embeddings/gemini_embedding.py +2 -2
- camel/embeddings/jina_embedding.py +10 -3
- camel/embeddings/mistral_embedding.py +2 -2
- camel/embeddings/openai_compatible_embedding.py +2 -2
- camel/embeddings/openai_embedding.py +2 -2
- camel/embeddings/sentence_transformers_embeddings.py +4 -4
- camel/embeddings/together_embedding.py +2 -2
- camel/embeddings/vlm_embedding.py +11 -4
- camel/environments/__init__.py +14 -2
- camel/environments/models.py +2 -2
- camel/environments/multi_step.py +2 -2
- camel/environments/rlcards_env.py +860 -0
- camel/environments/single_step.py +30 -5
- camel/environments/tic_tac_toe.py +3 -3
- camel/extractors/__init__.py +2 -2
- camel/extractors/base.py +2 -2
- camel/extractors/python_strategies.py +2 -2
- camel/generators.py +2 -2
- camel/human.py +2 -2
- camel/interpreters/__init__.py +4 -2
- camel/interpreters/base.py +16 -3
- camel/interpreters/docker/Dockerfile +53 -7
- camel/interpreters/docker_interpreter.py +70 -11
- camel/interpreters/e2b_interpreter.py +59 -11
- camel/interpreters/internal_python_interpreter.py +81 -4
- camel/interpreters/interpreter_error.py +2 -2
- camel/interpreters/ipython_interpreter.py +23 -5
- camel/interpreters/microsandbox_interpreter.py +395 -0
- camel/interpreters/subprocess_interpreter.py +36 -4
- camel/loaders/__init__.py +17 -5
- camel/loaders/apify_reader.py +2 -2
- camel/loaders/base_io.py +2 -2
- camel/loaders/base_loader.py +85 -0
- camel/loaders/chunkr_reader.py +128 -93
- camel/loaders/crawl4ai_reader.py +2 -2
- camel/loaders/firecrawl_reader.py +6 -6
- camel/loaders/jina_url_reader.py +2 -2
- camel/loaders/markitdown.py +2 -2
- camel/loaders/mineru_extractor.py +2 -2
- camel/loaders/mistral_reader.py +148 -0
- camel/loaders/scrapegraph_reader.py +2 -2
- camel/loaders/unstructured_io.py +2 -2
- camel/logger.py +5 -5
- camel/memories/__init__.py +2 -2
- camel/memories/agent_memories.py +86 -3
- camel/memories/base.py +36 -2
- camel/memories/blocks/__init__.py +2 -2
- camel/memories/blocks/chat_history_block.py +126 -9
- camel/memories/blocks/vectordb_block.py +10 -3
- camel/memories/context_creators/__init__.py +2 -2
- camel/memories/context_creators/score_based.py +31 -239
- camel/memories/records.py +98 -13
- camel/messages/__init__.py +2 -2
- camel/messages/base.py +193 -46
- camel/messages/conversion/__init__.py +2 -2
- camel/messages/conversion/alpaca.py +2 -2
- camel/messages/conversion/conversation_models.py +2 -2
- camel/messages/conversion/sharegpt/__init__.py +2 -2
- camel/messages/conversion/sharegpt/function_call_formatter.py +2 -2
- camel/messages/conversion/sharegpt/hermes/__init__.py +2 -2
- camel/messages/conversion/sharegpt/hermes/hermes_function_formatter.py +2 -2
- camel/messages/func_message.py +54 -17
- camel/models/__init__.py +18 -2
- camel/models/_utils.py +3 -3
- camel/models/aihubmix_model.py +83 -0
- camel/models/aiml_model.py +11 -18
- camel/models/amd_model.py +101 -0
- camel/models/anthropic_model.py +127 -20
- camel/models/aws_bedrock_model.py +12 -35
- camel/models/azure_openai_model.py +263 -63
- camel/models/base_audio_model.py +5 -3
- camel/models/base_model.py +195 -26
- camel/models/cerebras_model.py +83 -0
- camel/models/cohere_model.py +81 -21
- camel/models/cometapi_model.py +83 -0
- camel/models/crynux_model.py +87 -0
- camel/models/deepseek_model.py +61 -59
- camel/models/fish_audio_model.py +8 -2
- camel/models/gemini_model.py +439 -30
- camel/models/groq_model.py +11 -19
- camel/models/internlm_model.py +11 -18
- camel/models/litellm_model.py +94 -34
- camel/models/lmstudio_model.py +17 -20
- camel/models/minimax_model.py +83 -0
- camel/models/mistral_model.py +84 -19
- camel/models/model_factory.py +49 -6
- camel/models/model_manager.py +33 -11
- camel/models/modelscope_model.py +13 -193
- camel/models/moonshot_model.py +195 -21
- camel/models/nebius_model.py +83 -0
- camel/models/nemotron_model.py +19 -9
- camel/models/netmind_model.py +11 -18
- camel/models/novita_model.py +11 -18
- camel/models/nvidia_model.py +11 -18
- camel/models/ollama_model.py +14 -21
- camel/models/openai_audio_models.py +2 -2
- camel/models/openai_compatible_model.py +234 -27
- camel/models/openai_model.py +255 -39
- camel/models/openrouter_model.py +11 -19
- camel/models/ppio_model.py +11 -18
- camel/models/qianfan_model.py +89 -0
- camel/models/qwen_model.py +13 -193
- camel/models/reka_model.py +90 -21
- camel/models/reward/__init__.py +2 -2
- camel/models/reward/base_reward_model.py +2 -2
- camel/models/reward/evaluator.py +2 -2
- camel/models/reward/nemotron_model.py +2 -2
- camel/models/reward/skywork_model.py +2 -2
- camel/models/samba_model.py +117 -49
- camel/models/sglang_model.py +162 -42
- camel/models/siliconflow_model.py +12 -35
- camel/models/stub_model.py +10 -7
- camel/models/togetherai_model.py +11 -18
- camel/models/vllm_model.py +10 -18
- camel/models/volcano_model.py +16 -20
- camel/models/watsonx_model.py +69 -19
- camel/models/yi_model.py +11 -18
- camel/models/zhipuai_model.py +70 -18
- camel/parsers/__init__.py +18 -0
- camel/parsers/mcp_tool_call_parser.py +176 -0
- camel/personas/__init__.py +2 -2
- camel/personas/persona.py +2 -2
- camel/personas/persona_hub.py +2 -2
- camel/prompts/__init__.py +2 -2
- camel/prompts/ai_society.py +2 -2
- camel/prompts/base.py +2 -2
- camel/prompts/code.py +2 -2
- camel/prompts/evaluation.py +2 -2
- camel/prompts/generate_text_embedding_data.py +2 -2
- camel/prompts/image_craft.py +2 -2
- camel/prompts/misalignment.py +2 -2
- camel/prompts/multi_condition_image_craft.py +2 -2
- camel/prompts/object_recognition.py +2 -2
- camel/prompts/persona_hub.py +3 -3
- camel/prompts/prompt_templates.py +2 -2
- camel/prompts/role_description_prompt_template.py +2 -2
- camel/prompts/solution_extraction.py +8 -8
- camel/prompts/task_prompt_template.py +2 -2
- camel/prompts/translation.py +2 -2
- camel/prompts/video_description_prompt.py +3 -3
- camel/responses/__init__.py +2 -2
- camel/responses/agent_responses.py +2 -2
- camel/retrievers/__init__.py +2 -2
- camel/retrievers/auto_retriever.py +23 -3
- camel/retrievers/base.py +2 -2
- camel/retrievers/bm25_retriever.py +3 -4
- camel/retrievers/cohere_rerank_retriever.py +2 -2
- camel/retrievers/hybrid_retrival.py +4 -4
- camel/retrievers/vector_retriever.py +2 -2
- camel/runtimes/Dockerfile.multi-toolkit +90 -0
- camel/{runtime → runtimes}/__init__.py +2 -2
- camel/runtimes/api.py +153 -0
- camel/{runtime → runtimes}/base.py +2 -2
- camel/{runtime → runtimes}/configs.py +13 -13
- camel/{runtime → runtimes}/daytona_runtime.py +18 -19
- camel/{runtime → runtimes}/docker_runtime.py +13 -13
- camel/{runtime → runtimes}/llm_guard_runtime.py +28 -28
- camel/{runtime → runtimes}/remote_http_runtime.py +12 -12
- camel/{runtime → runtimes}/ubuntu_docker_runtime.py +3 -3
- camel/{runtime → runtimes}/utils/__init__.py +2 -2
- camel/{runtime → runtimes}/utils/function_risk_toolkit.py +2 -2
- camel/{runtime → runtimes}/utils/ignore_risk_toolkit.py +2 -2
- camel/schemas/__init__.py +2 -2
- camel/schemas/base.py +2 -2
- camel/schemas/openai_converter.py +3 -3
- camel/schemas/outlines_converter.py +2 -2
- camel/services/agent_openapi_server.py +380 -0
- camel/societies/__init__.py +4 -2
- camel/societies/babyagi_playing.py +2 -2
- camel/societies/role_playing.py +201 -80
- camel/societies/workforce/__init__.py +10 -3
- camel/societies/workforce/base.py +9 -5
- camel/societies/workforce/events.py +143 -0
- camel/societies/workforce/prompts.py +258 -33
- camel/societies/workforce/role_playing_worker.py +95 -30
- camel/societies/workforce/single_agent_worker.py +659 -30
- camel/societies/workforce/structured_output_handler.py +512 -0
- camel/societies/workforce/task_channel.py +182 -38
- camel/societies/workforce/utils.py +784 -18
- camel/societies/workforce/worker.py +96 -28
- camel/societies/workforce/workflow_memory_manager.py +1746 -0
- camel/societies/workforce/workforce.py +5730 -366
- camel/societies/workforce/workforce_callback.py +103 -0
- camel/societies/workforce/workforce_logger.py +647 -0
- camel/societies/workforce/workforce_metrics.py +33 -0
- camel/storages/__init__.py +10 -2
- camel/storages/graph_storages/__init__.py +2 -2
- camel/storages/graph_storages/base.py +2 -2
- camel/storages/graph_storages/graph_element.py +2 -2
- camel/storages/graph_storages/nebula_graph.py +4 -4
- camel/storages/graph_storages/neo4j_graph.py +7 -7
- camel/storages/key_value_storages/__init__.py +2 -2
- camel/storages/key_value_storages/base.py +2 -2
- camel/storages/key_value_storages/in_memory.py +2 -2
- camel/storages/key_value_storages/json.py +17 -4
- camel/storages/key_value_storages/mem0_cloud.py +50 -49
- camel/storages/key_value_storages/redis.py +2 -2
- camel/storages/object_storages/__init__.py +2 -2
- camel/storages/object_storages/amazon_s3.py +2 -2
- camel/storages/object_storages/azure_blob.py +2 -2
- camel/storages/object_storages/base.py +2 -2
- camel/storages/object_storages/google_cloud.py +3 -3
- camel/storages/vectordb_storages/__init__.py +12 -2
- camel/storages/vectordb_storages/base.py +2 -2
- camel/storages/vectordb_storages/chroma.py +731 -0
- camel/storages/vectordb_storages/faiss.py +712 -0
- camel/storages/vectordb_storages/milvus.py +2 -2
- camel/storages/vectordb_storages/oceanbase.py +16 -17
- camel/storages/vectordb_storages/pgvector.py +349 -0
- camel/storages/vectordb_storages/qdrant.py +6 -6
- camel/storages/vectordb_storages/surreal.py +372 -0
- camel/storages/vectordb_storages/tidb.py +11 -8
- camel/storages/vectordb_storages/weaviate.py +714 -0
- camel/tasks/__init__.py +2 -2
- camel/tasks/task.py +366 -27
- camel/tasks/task_prompt.py +3 -3
- camel/terminators/__init__.py +2 -2
- camel/terminators/base.py +2 -2
- camel/terminators/response_terminator.py +2 -2
- camel/terminators/token_limit_terminator.py +2 -2
- camel/toolkits/__init__.py +58 -10
- camel/toolkits/aci_toolkit.py +66 -21
- camel/toolkits/arxiv_toolkit.py +8 -8
- camel/toolkits/ask_news_toolkit.py +2 -2
- camel/toolkits/async_browser_toolkit.py +174 -575
- camel/toolkits/audio_analysis_toolkit.py +3 -3
- camel/toolkits/base.py +65 -7
- camel/toolkits/bohrium_toolkit.py +318 -0
- camel/toolkits/browser_toolkit.py +306 -566
- camel/toolkits/browser_toolkit_commons.py +568 -0
- camel/toolkits/code_execution.py +67 -11
- camel/toolkits/context_summarizer_toolkit.py +684 -0
- camel/toolkits/craw4ai_toolkit.py +93 -0
- camel/toolkits/dappier_toolkit.py +12 -8
- camel/toolkits/data_commons_toolkit.py +2 -2
- camel/toolkits/dingtalk.py +1135 -0
- camel/toolkits/earth_science_toolkit.py +5367 -0
- camel/toolkits/edgeone_pages_mcp_toolkit.py +49 -0
- camel/toolkits/excel_toolkit.py +910 -70
- camel/toolkits/file_toolkit.py +1402 -0
- camel/toolkits/function_tool.py +128 -20
- camel/toolkits/github_toolkit.py +148 -43
- camel/toolkits/gmail_toolkit.py +1839 -0
- camel/toolkits/google_calendar_toolkit.py +40 -6
- camel/toolkits/google_drive_mcp_toolkit.py +54 -0
- camel/toolkits/google_maps_toolkit.py +2 -2
- camel/toolkits/google_scholar_toolkit.py +2 -2
- camel/toolkits/human_toolkit.py +36 -12
- camel/toolkits/hybrid_browser_toolkit/__init__.py +18 -0
- camel/toolkits/hybrid_browser_toolkit/config_loader.py +185 -0
- camel/toolkits/hybrid_browser_toolkit/hybrid_browser_toolkit.py +246 -0
- camel/toolkits/hybrid_browser_toolkit/hybrid_browser_toolkit_ts.py +1973 -0
- camel/toolkits/hybrid_browser_toolkit/installer.py +203 -0
- camel/toolkits/hybrid_browser_toolkit/ts/package-lock.json +4589 -0
- camel/toolkits/hybrid_browser_toolkit/ts/package.json +33 -0
- camel/toolkits/hybrid_browser_toolkit/ts/src/browser-scripts.js +125 -0
- camel/toolkits/hybrid_browser_toolkit/ts/src/browser-session.ts +1929 -0
- camel/toolkits/hybrid_browser_toolkit/ts/src/config-loader.ts +233 -0
- camel/toolkits/hybrid_browser_toolkit/ts/src/hybrid-browser-toolkit.ts +589 -0
- camel/toolkits/hybrid_browser_toolkit/ts/src/index.ts +7 -0
- camel/toolkits/hybrid_browser_toolkit/ts/src/parent-child-filter.ts +226 -0
- camel/toolkits/hybrid_browser_toolkit/ts/src/snapshot-parser.ts +219 -0
- camel/toolkits/hybrid_browser_toolkit/ts/src/som-screenshot-injected.ts +543 -0
- camel/toolkits/hybrid_browser_toolkit/ts/src/types.ts +129 -0
- camel/toolkits/hybrid_browser_toolkit/ts/tsconfig.json +27 -0
- camel/toolkits/hybrid_browser_toolkit/ts/websocket-server.js +319 -0
- camel/toolkits/hybrid_browser_toolkit/ws_wrapper.py +1037 -0
- camel/toolkits/hybrid_browser_toolkit_py/__init__.py +17 -0
- camel/toolkits/hybrid_browser_toolkit_py/actions.py +575 -0
- camel/toolkits/hybrid_browser_toolkit_py/agent.py +311 -0
- camel/toolkits/hybrid_browser_toolkit_py/browser_session.py +787 -0
- camel/toolkits/hybrid_browser_toolkit_py/config_loader.py +490 -0
- camel/toolkits/hybrid_browser_toolkit_py/hybrid_browser_toolkit.py +2390 -0
- camel/toolkits/hybrid_browser_toolkit_py/snapshot.py +233 -0
- camel/toolkits/hybrid_browser_toolkit_py/stealth_script.js +0 -0
- camel/toolkits/hybrid_browser_toolkit_py/unified_analyzer.js +1043 -0
- camel/toolkits/image_analysis_toolkit.py +3 -3
- camel/toolkits/image_generation_toolkit.py +390 -0
- camel/toolkits/jina_reranker_toolkit.py +195 -79
- camel/toolkits/klavis_toolkit.py +7 -3
- camel/toolkits/linkedin_toolkit.py +2 -2
- camel/toolkits/markitdown_toolkit.py +104 -0
- camel/toolkits/math_toolkit.py +66 -12
- camel/toolkits/mcp_toolkit.py +841 -600
- camel/toolkits/memory_toolkit.py +7 -3
- camel/toolkits/meshy_toolkit.py +2 -2
- camel/toolkits/message_agent_toolkit.py +608 -0
- camel/toolkits/message_integration.py +724 -0
- camel/toolkits/mineru_toolkit.py +2 -2
- camel/toolkits/minimax_mcp_toolkit.py +195 -0
- camel/toolkits/networkx_toolkit.py +2 -2
- camel/toolkits/note_taking_toolkit.py +277 -0
- camel/toolkits/notion_mcp_toolkit.py +224 -0
- camel/toolkits/notion_toolkit.py +2 -2
- camel/toolkits/open_api_specs/biztoc/__init__.py +2 -2
- camel/toolkits/open_api_specs/biztoc/ai-plugin.json +1 -1
- camel/toolkits/open_api_specs/coursera/__init__.py +2 -2
- camel/toolkits/open_api_specs/create_qr_code/__init__.py +2 -2
- camel/toolkits/open_api_specs/klarna/__init__.py +2 -2
- camel/toolkits/open_api_specs/nasa_apod/__init__.py +2 -2
- camel/toolkits/open_api_specs/outschool/__init__.py +2 -2
- camel/toolkits/open_api_specs/outschool/ai-plugin.json +1 -1
- camel/toolkits/open_api_specs/outschool/openapi.yaml +1 -1
- camel/toolkits/open_api_specs/outschool/paths/__init__.py +2 -2
- camel/toolkits/open_api_specs/outschool/paths/get_classes.py +2 -2
- camel/toolkits/open_api_specs/outschool/paths/search_teachers.py +2 -2
- camel/toolkits/open_api_specs/security_config.py +2 -2
- camel/toolkits/open_api_specs/speak/__init__.py +2 -2
- camel/toolkits/open_api_specs/web_scraper/__init__.py +2 -2
- camel/toolkits/open_api_specs/web_scraper/ai-plugin.json +1 -1
- camel/toolkits/open_api_specs/web_scraper/paths/__init__.py +2 -2
- camel/toolkits/open_api_specs/web_scraper/paths/scraper.py +2 -2
- camel/toolkits/open_api_toolkit.py +2 -2
- camel/toolkits/openbb_toolkit.py +7 -3
- camel/toolkits/origene_mcp_toolkit.py +56 -0
- camel/toolkits/page_script.js +86 -74
- camel/toolkits/playwright_mcp_toolkit.py +27 -32
- camel/toolkits/pptx_toolkit.py +790 -0
- camel/toolkits/pubmed_toolkit.py +2 -2
- camel/toolkits/pulse_mcp_search_toolkit.py +2 -2
- camel/toolkits/pyautogui_toolkit.py +2 -2
- camel/toolkits/reddit_toolkit.py +2 -2
- camel/toolkits/resend_toolkit.py +168 -0
- camel/toolkits/retrieval_toolkit.py +2 -2
- camel/toolkits/screenshot_toolkit.py +213 -0
- camel/toolkits/search_toolkit.py +539 -146
- camel/toolkits/searxng_toolkit.py +2 -2
- camel/toolkits/semantic_scholar_toolkit.py +2 -2
- camel/toolkits/slack_toolkit.py +108 -58
- camel/toolkits/sql_toolkit.py +712 -0
- camel/toolkits/stripe_toolkit.py +2 -2
- camel/toolkits/sympy_toolkit.py +3 -3
- camel/toolkits/task_planning_toolkit.py +134 -0
- camel/toolkits/terminal_toolkit/__init__.py +18 -0
- camel/toolkits/terminal_toolkit/terminal_toolkit.py +1070 -0
- camel/toolkits/terminal_toolkit/utils.py +532 -0
- camel/toolkits/thinking_toolkit.py +3 -3
- camel/toolkits/twitter_toolkit.py +8 -3
- camel/toolkits/vertex_ai_veo_toolkit.py +590 -0
- camel/toolkits/video_analysis_toolkit.py +112 -29
- camel/toolkits/video_download_toolkit.py +22 -16
- camel/toolkits/weather_toolkit.py +2 -2
- camel/toolkits/web_deploy_toolkit.py +1219 -0
- camel/toolkits/wechat_official_toolkit.py +483 -0
- camel/toolkits/whatsapp_toolkit.py +2 -2
- camel/toolkits/wolfram_alpha_toolkit.py +53 -25
- camel/toolkits/zapier_toolkit.py +7 -3
- camel/types/__init__.py +4 -4
- camel/types/agents/__init__.py +2 -2
- camel/types/agents/tool_calling_record.py +6 -3
- camel/types/enums.py +454 -35
- camel/types/mcp_registries.py +2 -2
- camel/types/openai_types.py +4 -4
- camel/types/unified_model_type.py +43 -6
- camel/utils/__init__.py +20 -2
- camel/utils/async_func.py +2 -2
- camel/utils/chunker/__init__.py +2 -2
- camel/utils/chunker/base.py +2 -2
- camel/utils/chunker/code_chunker.py +2 -2
- camel/utils/chunker/uio_chunker.py +2 -2
- camel/utils/commons.py +65 -7
- camel/utils/constants.py +5 -2
- camel/utils/context_utils.py +1134 -0
- camel/utils/deduplication.py +2 -2
- camel/utils/filename.py +2 -2
- camel/utils/langfuse.py +258 -0
- camel/utils/mcp.py +140 -6
- camel/utils/mcp_client.py +1056 -0
- camel/utils/message_summarizer.py +148 -0
- camel/utils/response_format.py +2 -2
- camel/utils/token_counting.py +45 -22
- camel/utils/tool_result.py +44 -0
- camel/verifiers/__init__.py +2 -2
- camel/verifiers/base.py +2 -2
- camel/verifiers/math_verifier.py +2 -2
- camel/verifiers/models.py +2 -2
- camel/verifiers/physics_verifier.py +2 -2
- camel/verifiers/python_verifier.py +2 -2
- {camel_ai-0.2.59.dist-info → camel_ai-0.2.82.dist-info}/METADATA +349 -108
- camel_ai-0.2.82.dist-info/RECORD +507 -0
- {camel_ai-0.2.59.dist-info → camel_ai-0.2.82.dist-info}/WHEEL +1 -1
- {camel_ai-0.2.59.dist-info → camel_ai-0.2.82.dist-info}/licenses/LICENSE +1 -1
- camel/loaders/pandas_reader.py +0 -368
- camel/runtime/api.py +0 -97
- camel/toolkits/dalle_toolkit.py +0 -171
- camel/toolkits/file_write_toolkit.py +0 -395
- camel/toolkits/openai_agent_toolkit.py +0 -135
- camel/toolkits/terminal_toolkit.py +0 -1037
- camel_ai-0.2.59.dist-info/RECORD +0 -410
camel/types/enums.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# ========= Copyright 2023-
|
|
1
|
+
# ========= Copyright 2023-2025 @ CAMEL-AI.org. All Rights Reserved. =========
|
|
2
2
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
3
|
# you may not use this file except in compliance with the License.
|
|
4
4
|
# You may obtain a copy of the License at
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
11
|
# See the License for the specific language governing permissions and
|
|
12
12
|
# limitations under the License.
|
|
13
|
-
# ========= Copyright 2023-
|
|
13
|
+
# ========= Copyright 2023-2025 @ CAMEL-AI.org. All Rights Reserved. =========
|
|
14
14
|
import os
|
|
15
15
|
from enum import Enum, EnumMeta
|
|
16
|
-
from typing import cast
|
|
16
|
+
from typing import Union, cast
|
|
17
17
|
|
|
18
18
|
from camel.logger import get_logger
|
|
19
19
|
from camel.types.unified_model_type import UnifiedModelType
|
|
@@ -24,13 +24,14 @@ logger = get_logger(__name__)
|
|
|
24
24
|
class RoleType(Enum):
|
|
25
25
|
ASSISTANT = "assistant"
|
|
26
26
|
USER = "user"
|
|
27
|
+
SYSTEM = "system"
|
|
27
28
|
CRITIC = "critic"
|
|
28
29
|
EMBODIMENT = "embodiment"
|
|
29
30
|
DEFAULT = "default"
|
|
30
31
|
|
|
31
32
|
|
|
32
33
|
class ModelType(UnifiedModelType, Enum):
|
|
33
|
-
DEFAULT = os.getenv("DEFAULT_MODEL_TYPE", "gpt-
|
|
34
|
+
DEFAULT = os.getenv("DEFAULT_MODEL_TYPE", "gpt-4.1-mini-2025-04-14")
|
|
34
35
|
|
|
35
36
|
GPT_3_5_TURBO = "gpt-3.5-turbo"
|
|
36
37
|
GPT_4 = "gpt-4"
|
|
@@ -47,6 +48,12 @@ class ModelType(UnifiedModelType, Enum):
|
|
|
47
48
|
GPT_4_1_NANO = "gpt-4.1-nano-2025-04-14"
|
|
48
49
|
O4_MINI = "o4-mini"
|
|
49
50
|
O3 = "o3"
|
|
51
|
+
O3_PRO = "o3-pro"
|
|
52
|
+
GPT_5_1 = "gpt-5.1"
|
|
53
|
+
GPT_5_2 = ("gpt-5.2",)
|
|
54
|
+
GPT_5 = "gpt-5"
|
|
55
|
+
GPT_5_MINI = "gpt-5-mini"
|
|
56
|
+
GPT_5_NANO = "gpt-5-nano"
|
|
50
57
|
|
|
51
58
|
AWS_CLAUDE_3_7_SONNET = "anthropic.claude-3-7-sonnet-20250219-v1:0"
|
|
52
59
|
AWS_CLAUDE_3_5_SONNET = "anthropic.claude-3-5-sonnet-20241022-v2:0"
|
|
@@ -56,6 +63,11 @@ class ModelType(UnifiedModelType, Enum):
|
|
|
56
63
|
AWS_LLAMA_3_3_70B_INSTRUCT = "us.meta.llama3-3-70b-instruct-v1:0"
|
|
57
64
|
AWS_LLAMA_3_2_90B_INSTRUCT = "us.meta.llama3-2-90b-instruct-v1:0"
|
|
58
65
|
AWS_LLAMA_3_2_11B_INSTRUCT = "us.meta.llama3-2-11b-instruct-v1:0"
|
|
66
|
+
AWS_CLAUDE_SONNET_4 = "anthropic.claude-sonnet-4-20250514-v1:0"
|
|
67
|
+
AWS_CLAUDE_OPUS_4 = "anthropic.claude-opus-4-20250514-v1:0"
|
|
68
|
+
AWS_CLAUDE_OPUS_4_1 = "anthropic.claude-opus-4-1-20250805-v1:0"
|
|
69
|
+
|
|
70
|
+
AMD_GPT4 = "dvue-aoai-001-gpt-4.1"
|
|
59
71
|
|
|
60
72
|
GLM_4 = "glm-4"
|
|
61
73
|
GLM_4V = "glm-4v"
|
|
@@ -74,11 +86,57 @@ class ModelType(UnifiedModelType, Enum):
|
|
|
74
86
|
# Groq platform models
|
|
75
87
|
GROQ_LLAMA_3_1_8B = "llama-3.1-8b-instant"
|
|
76
88
|
GROQ_LLAMA_3_3_70B = "llama-3.3-70b-versatile"
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
89
|
+
|
|
90
|
+
# Cerebras platform models
|
|
91
|
+
CEREBRAS_GPT_OSS_120B = "gpt-oss-120b"
|
|
92
|
+
CEREBRAS_LLAMA_3_1_8B = "llama3.1-8b"
|
|
93
|
+
CEREBRAS_LLAMA_3_3_70B = "llama3.3-70b"
|
|
94
|
+
CEREBRAS_QWEN_3_32B = "qwen-3-32b"
|
|
95
|
+
|
|
96
|
+
# Nebius AI Studio platform models
|
|
97
|
+
NEBIUS_GPT_OSS_120B = "gpt-oss-120b"
|
|
98
|
+
NEBIUS_GPT_OSS_20B = "gpt-oss-20b"
|
|
99
|
+
NEBIUS_GLM_4_5 = "GLM-4.5"
|
|
100
|
+
NEBIUS_DEEPSEEK_V3 = "deepseek-ai/DeepSeek-V3"
|
|
101
|
+
NEBIUS_DEEPSEEK_R1 = "deepseek-ai/DeepSeek-R1"
|
|
102
|
+
NEBIUS_LLAMA_3_1_70B = "meta-llama/Meta-Llama-3.1-70B-Instruct"
|
|
103
|
+
NEBIUS_MISTRAL_7B_INSTRUCT = "mistralai/Mistral-7B-Instruct-v0.3"
|
|
104
|
+
|
|
105
|
+
# CometAPI platform models
|
|
106
|
+
COMETAPI_GPT_5_CHAT_LATEST = "gpt-5-chat-latest"
|
|
107
|
+
COMETAPI_CHATGPT_4O_LATEST = "chatgpt-4o-latest"
|
|
108
|
+
COMETAPI_GPT_5_MINI = "gpt-5-mini"
|
|
109
|
+
COMETAPI_GPT_5_NANO = "gpt-5-nano"
|
|
110
|
+
COMETAPI_GPT_5 = "gpt-5"
|
|
111
|
+
COMETAPI_GPT_4_1 = "gpt-4.1"
|
|
112
|
+
COMETAPI_GPT_4O_MINI = "gpt-4o-mini"
|
|
113
|
+
COMETAPI_O4_MINI_2025_04_16 = "o4-mini-2025-04-16"
|
|
114
|
+
COMETAPI_O3_PRO_2025_06_10 = "o3-pro-2025-06-10"
|
|
115
|
+
COMETAPI_CLAUDE_OPUS_4_1_20250805 = "claude-opus-4-1-20250805"
|
|
116
|
+
COMETAPI_CLAUDE_OPUS_4_1_20250805_THINKING = (
|
|
117
|
+
"claude-opus-4-1-20250805-thinking"
|
|
118
|
+
)
|
|
119
|
+
COMETAPI_CLAUDE_SONNET_4_20250514 = "claude-sonnet-4-20250514"
|
|
120
|
+
COMETAPI_CLAUDE_SONNET_4_20250514_THINKING = (
|
|
121
|
+
"claude-sonnet-4-20250514-thinking"
|
|
122
|
+
)
|
|
123
|
+
COMETAPI_CLAUDE_3_7_SONNET_LATEST = "claude-3-7-sonnet-latest"
|
|
124
|
+
COMETAPI_CLAUDE_3_5_HAIKU_LATEST = "claude-3-5-haiku-latest"
|
|
125
|
+
COMETAPI_GEMINI_2_5_PRO = "gemini-2.5-pro"
|
|
126
|
+
COMETAPI_GEMINI_2_5_FLASH = "gemini-2.5-flash"
|
|
127
|
+
COMETAPI_GEMINI_2_5_FLASH_LITE = "gemini-2.5-flash-lite"
|
|
128
|
+
COMETAPI_GEMINI_2_0_FLASH = "gemini-2.0-flash"
|
|
129
|
+
COMETAPI_GROK_4_0709 = "grok-4-0709"
|
|
130
|
+
COMETAPI_GROK_3 = "grok-3"
|
|
131
|
+
COMETAPI_GROK_3_MINI = "grok-3-mini"
|
|
132
|
+
COMETAPI_GROK_2_IMAGE_1212 = "grok-2-image-1212"
|
|
133
|
+
COMETAPI_DEEPSEEK_V3_1 = "deepseek-v3.1"
|
|
134
|
+
COMETAPI_DEEPSEEK_V3 = "deepseek-v3"
|
|
135
|
+
COMETAPI_DEEPSEEK_R1_0528 = "deepseek-r1-0528"
|
|
136
|
+
COMETAPI_DEEPSEEK_CHAT = "deepseek-chat"
|
|
137
|
+
COMETAPI_DEEPSEEK_REASONER = "deepseek-reasoner"
|
|
138
|
+
COMETAPI_QWEN3_30B_A3B = "qwen3-30b-a3b"
|
|
139
|
+
COMETAPI_QWEN3_CODER_PLUS_2025_07_22 = "qwen3-coder-plus-2025-07-22"
|
|
82
140
|
|
|
83
141
|
# OpenRouter models
|
|
84
142
|
OPENROUTER_LLAMA_3_1_405B = "meta-llama/llama-3.1-405b-instruct"
|
|
@@ -88,6 +146,7 @@ class ModelType(UnifiedModelType, Enum):
|
|
|
88
146
|
OPENROUTER_LLAMA_4_SCOUT = "meta-llama/llama-4-scout"
|
|
89
147
|
OPENROUTER_LLAMA_4_SCOUT_FREE = "meta-llama/llama-4-scout:free"
|
|
90
148
|
OPENROUTER_OLYMPICODER_7B = "open-r1/olympiccoder-7b:free"
|
|
149
|
+
OPENROUTER_HORIZON_ALPHA = "openrouter/horizon-alpha"
|
|
91
150
|
|
|
92
151
|
# LMStudio models
|
|
93
152
|
LMSTUDIO_GEMMA_3_1B = "gemma-3-1b"
|
|
@@ -145,13 +204,18 @@ class ModelType(UnifiedModelType, Enum):
|
|
|
145
204
|
CLAUDE_2_0 = "claude-2.0"
|
|
146
205
|
CLAUDE_INSTANT_1_2 = "claude-instant-1.2"
|
|
147
206
|
|
|
148
|
-
#
|
|
207
|
+
# Claude models
|
|
149
208
|
CLAUDE_3_OPUS = "claude-3-opus-latest"
|
|
150
209
|
CLAUDE_3_SONNET = "claude-3-sonnet-20240229"
|
|
151
210
|
CLAUDE_3_HAIKU = "claude-3-haiku-20240307"
|
|
152
211
|
CLAUDE_3_5_SONNET = "claude-3-5-sonnet-latest"
|
|
153
212
|
CLAUDE_3_5_HAIKU = "claude-3-5-haiku-latest"
|
|
154
213
|
CLAUDE_3_7_SONNET = "claude-3-7-sonnet-latest"
|
|
214
|
+
CLAUDE_SONNET_4_5 = "claude-sonnet-4-5"
|
|
215
|
+
CLAUDE_OPUS_4_5 = "claude-opus-4-5"
|
|
216
|
+
CLAUDE_SONNET_4 = "claude-sonnet-4-20250514"
|
|
217
|
+
CLAUDE_OPUS_4 = "claude-opus-4-20250514"
|
|
218
|
+
CLAUDE_OPUS_4_1 = "claude-opus-4-1-20250805"
|
|
155
219
|
|
|
156
220
|
# Netmind models
|
|
157
221
|
NETMIND_LLAMA_4_MAVERICK_17B_128E_INSTRUCT = (
|
|
@@ -180,13 +244,16 @@ class ModelType(UnifiedModelType, Enum):
|
|
|
180
244
|
NVIDIA_LLAMA3_3_70B_INSTRUCT = "meta/llama-3.3-70b-instruct"
|
|
181
245
|
|
|
182
246
|
# Gemini models
|
|
183
|
-
|
|
184
|
-
|
|
247
|
+
GEMINI_3_PRO = "gemini-3-pro-preview"
|
|
248
|
+
GEMINI_3_FLASH = "gemini-3-flash-preview"
|
|
249
|
+
GEMINI_2_5_FLASH = "gemini-2.5-flash"
|
|
250
|
+
GEMINI_2_5_PRO = "gemini-2.5-pro"
|
|
251
|
+
GEMINI_2_0_FLASH = "gemini-2.0-flash"
|
|
252
|
+
GEMINI_2_0_FLASH_EXP = "gemini-2.0-flash-exp"
|
|
185
253
|
GEMINI_2_0_FLASH_THINKING = "gemini-2.0-flash-thinking-exp"
|
|
186
254
|
GEMINI_2_0_PRO_EXP = "gemini-2.0-pro-exp-02-05"
|
|
255
|
+
GEMINI_2_0_FLASH_LITE = "gemini-2.0-flash-lite"
|
|
187
256
|
GEMINI_2_0_FLASH_LITE_PREVIEW = "gemini-2.0-flash-lite-preview-02-05"
|
|
188
|
-
GEMINI_1_5_FLASH = "gemini-1.5-flash"
|
|
189
|
-
GEMINI_1_5_PRO = "gemini-1.5-pro"
|
|
190
257
|
|
|
191
258
|
# Mistral AI models
|
|
192
259
|
MISTRAL_3B = "ministral-3b-latest"
|
|
@@ -199,7 +266,10 @@ class ModelType(UnifiedModelType, Enum):
|
|
|
199
266
|
MISTRAL_MIXTRAL_8x22B = "open-mixtral-8x22b"
|
|
200
267
|
MISTRAL_NEMO = "open-mistral-nemo"
|
|
201
268
|
MISTRAL_PIXTRAL_12B = "pixtral-12b-2409"
|
|
202
|
-
|
|
269
|
+
MISTRAL_MEDIUM_3_1 = "mistral-medium-2508"
|
|
270
|
+
MISTRAL_SMALL_3_2 = "mistral-small-2506"
|
|
271
|
+
MAGISTRAL_SMALL_1_2 = "magistral-small-1.2"
|
|
272
|
+
MAGISTRAL_MEDIUM_1_2 = "magistral-medium-1.2"
|
|
203
273
|
|
|
204
274
|
# Reka models
|
|
205
275
|
REKA_CORE = "reka-core"
|
|
@@ -235,6 +305,7 @@ class ModelType(UnifiedModelType, Enum):
|
|
|
235
305
|
QWEN_QWQ_32B = "qwq-32b-preview"
|
|
236
306
|
QWEN_QVQ_72B = "qvq-72b-preview"
|
|
237
307
|
QWEN_QWQ_PLUS = "qwq-plus"
|
|
308
|
+
QWEN_3_CODER_PLUS = "qwen3-coder-plus"
|
|
238
309
|
|
|
239
310
|
# Yi models (01-ai)
|
|
240
311
|
YI_LIGHTNING = "yi-lightning"
|
|
@@ -260,13 +331,36 @@ class ModelType(UnifiedModelType, Enum):
|
|
|
260
331
|
MOONSHOT_V1_8K = "moonshot-v1-8k"
|
|
261
332
|
MOONSHOT_V1_32K = "moonshot-v1-32k"
|
|
262
333
|
MOONSHOT_V1_128K = "moonshot-v1-128k"
|
|
334
|
+
MOONSHOT_KIMI_K2 = "kimi-k2-0711-preview"
|
|
263
335
|
|
|
264
336
|
# SiliconFlow models support tool calling
|
|
265
337
|
SILICONFLOW_DEEPSEEK_V2_5 = "deepseek-ai/DeepSeek-V2.5"
|
|
266
338
|
SILICONFLOW_DEEPSEEK_V3 = "deepseek-ai/DeepSeek-V3"
|
|
339
|
+
SILICONFLOW_PRO_DEEPSEEK_V3 = "Pro/deepseek-ai/DeepSeek-V3"
|
|
340
|
+
SILICONFLOW_DEEPSEEK_R1 = "deepseek-ai/DeepSeek-R1"
|
|
341
|
+
SILICONFLOW_PRO_DEEPSEEK_R1 = "Pro/deepseek-ai/DeepSeek-R1"
|
|
342
|
+
SILICONFLOW_DEEPSEEK_R1_DISTILL_QWEN_32B = (
|
|
343
|
+
"deepseek-ai/DeepSeek-R1-Distill-Qwen-32B"
|
|
344
|
+
)
|
|
345
|
+
SILICONFLOW_DEEPSEEK_R1_DISTILL_QWEN_14B = (
|
|
346
|
+
"deepseek-ai/DeepSeek-R1-Distill-Qwen-14B"
|
|
347
|
+
)
|
|
348
|
+
SILICONFLOW_DEEPSEEK_R1_DISTILL_QWEN_7B = (
|
|
349
|
+
"deepseek-ai/DeepSeek-R1-Distill-Qwen-7B"
|
|
350
|
+
)
|
|
351
|
+
SILICONFLOW_DEEPSEEK_R1_DISTILL_QWEN_1_5B = (
|
|
352
|
+
"deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B"
|
|
353
|
+
)
|
|
354
|
+
SILICONFLOW_PRO_DEEPSEEK_R1_DISTILL_QWEN_7B = (
|
|
355
|
+
"Pro/deepseek-ai/DeepSeek-R1-Distill-Qwen-7B"
|
|
356
|
+
)
|
|
357
|
+
SILICONFLOW_PRO_DEEPSEEK_R1_DISTILL_QWEN_1_5B = (
|
|
358
|
+
"Pro/deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B"
|
|
359
|
+
)
|
|
267
360
|
SILICONFLOW_INTERN_LM2_5_20B_CHAT = "internlm/internlm2_5-20b-chat"
|
|
268
361
|
SILICONFLOW_INTERN_LM2_5_7B_CHAT = "internlm/internlm2_5-7b-chat"
|
|
269
362
|
SILICONFLOW_PRO_INTERN_LM2_5_7B_CHAT = "Pro/internlm/internlm2_5-7b-chat"
|
|
363
|
+
SILICONFLOW_QWQ_32B = "Qwen/QwQ-32B"
|
|
270
364
|
SILICONFLOW_QWEN2_5_72B_INSTRUCT = "Qwen/Qwen2.5-72B-Instruct"
|
|
271
365
|
SILICONFLOW_QWEN2_5_32B_INSTRUCT = "Qwen/Qwen2.5-32B-Instruct"
|
|
272
366
|
SILICONFLOW_QWEN2_5_14B_INSTRUCT = "Qwen/Qwen2.5-14B-Instruct"
|
|
@@ -274,6 +368,12 @@ class ModelType(UnifiedModelType, Enum):
|
|
|
274
368
|
SILICONFLOW_PRO_QWEN2_5_7B_INSTRUCT = "Pro/Qwen/Qwen2.5-7B-Instruct"
|
|
275
369
|
SILICONFLOW_THUDM_GLM_4_9B_CHAT = "THUDM/glm-4-9b-chat"
|
|
276
370
|
SILICONFLOW_PRO_THUDM_GLM_4_9B_CHAT = "Pro/THUDM/glm-4-9b-chat"
|
|
371
|
+
SILICONFLOW_THUDM_GLM_Z1_32B_0414 = "THUDM/GLM-Z1-32B-0414"
|
|
372
|
+
SILICONFLOW_THUDM_GLM_4_32B_0414 = "THUDM/GLM-4-32B-0414"
|
|
373
|
+
SILICONFLOW_THUDM_GLM_Z1_RUMINATION_32B_0414 = (
|
|
374
|
+
"THUDM/GLM-Z1-Rumination-32B-0414"
|
|
375
|
+
)
|
|
376
|
+
SILICONFLOW_THUDM_GLM_4_9B_0414 = "THUDM/GLM-4-9B-0414"
|
|
277
377
|
|
|
278
378
|
# AIML models support tool calling
|
|
279
379
|
AIML_MIXTRAL_8X7B = "mistralai/Mixtral-8x7B-Instruct-v0.1"
|
|
@@ -360,6 +460,9 @@ class ModelType(UnifiedModelType, Enum):
|
|
|
360
460
|
MODELSCOPE_LLAMA_3_3_70B_INSTRUCT = "LLM-Research/Llama-3.3-70B-Instruct"
|
|
361
461
|
MODELSCOPE_MINISTRAL_8B_INSTRUCT = "mistralai/Ministral-8B-Instruct-2410"
|
|
362
462
|
MODELSCOPE_DEEPSEEK_V3_0324 = "deepseek-ai/DeepSeek-V3-0324"
|
|
463
|
+
MODELSCOPE_ERNIE_4_5_VL_28B_A3B_THINKING = (
|
|
464
|
+
"PaddlePaddle/ERNIE-4.5-VL-28B-A3B-Thinking"
|
|
465
|
+
)
|
|
363
466
|
|
|
364
467
|
# WatsonX models
|
|
365
468
|
WATSONX_GRANITE_3_8B_INSTRUCT = "ibm/granite-3-8b-instruct"
|
|
@@ -377,14 +480,52 @@ class ModelType(UnifiedModelType, Enum):
|
|
|
377
480
|
)
|
|
378
481
|
WATSONX_MISTRAL_LARGE = "mistralai/mistral-large"
|
|
379
482
|
|
|
483
|
+
# Qianfan models
|
|
484
|
+
ERNIE_X1_TURBO_32K = "ernie-x1-turbo-32k"
|
|
485
|
+
ERNIE_X1_32K = "ernie-x1-32k"
|
|
486
|
+
ERNIE_X1_32K_PREVIEW = "ernie-x1-32k-preview"
|
|
487
|
+
ERNIE_4_5_TURBO_128K = "ernie-4.5-turbo-128k"
|
|
488
|
+
ERNIE_4_5_TURBO_32K = "ernie-4.5-turbo-32k"
|
|
489
|
+
DEEPSEEK_V3 = "deepseek-v3"
|
|
490
|
+
DEEPSEEK_R1 = "deepseek-r1"
|
|
491
|
+
QWEN3_235B_A22B = "qwen3-235b-a22b"
|
|
492
|
+
ERNIE_5_0_THINKING = "ernie-5.0-thinking-latest"
|
|
493
|
+
ERNIE_4_5_TURBO_VL = "ernie-4.5-turbo-vl-latest"
|
|
494
|
+
|
|
495
|
+
# Crynux models
|
|
496
|
+
CRYNUX_DEEPSEEK_R1_DISTILL_QWEN_1_5B = (
|
|
497
|
+
"deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B"
|
|
498
|
+
)
|
|
499
|
+
CRYNUX_DEEPSEEK_R1_DISTILL_QWEN_7B = (
|
|
500
|
+
"deepseek-ai/DeepSeek-R1-Distill-Qwen-7B"
|
|
501
|
+
)
|
|
502
|
+
CRYNUX_DEEPSEEK_R1_DISTILL_LLAMA_8B = (
|
|
503
|
+
"deepseek-ai/DeepSeek-R1-Distill-Llama-8B"
|
|
504
|
+
)
|
|
505
|
+
|
|
506
|
+
CRYNUX_QWEN_3_4_B = "Qwen/Qwen3-4B"
|
|
507
|
+
CRYNUX_QWEN_3_8_B = "Qwen/Qwen3-8B"
|
|
508
|
+
CRYNUX_QWEN_2_5_7B = "Qwen/Qwen2.5-7B"
|
|
509
|
+
CRYNUX_QWEN_2_5_7B_INSTRUCT = "Qwen/Qwen2.5-7B-Instruct"
|
|
510
|
+
|
|
511
|
+
CRYNUX_NOUS_HERMES_3_LLAMA_3_1_8B = "NousResearch/Hermes-3-Llama-3.1-8B"
|
|
512
|
+
CRYNUX_NOUS_HERMES_3_LLAMA_3_2_3B = "NousResearch/Hermes-3-Llama-3.2-3B"
|
|
513
|
+
|
|
514
|
+
# Minimax M2 models
|
|
515
|
+
MINIMAX_M2 = "MiniMax-M2"
|
|
516
|
+
MINIMAX_M2_STABLE = "MiniMax-M2-Stable"
|
|
517
|
+
|
|
380
518
|
def __str__(self):
|
|
381
519
|
return self.value
|
|
382
520
|
|
|
383
|
-
def
|
|
521
|
+
def __repr__(self):
|
|
522
|
+
return self.value
|
|
523
|
+
|
|
524
|
+
def __new__(cls, value: Union["ModelType", str]) -> "ModelType":
|
|
384
525
|
return cast("ModelType", UnifiedModelType.__new__(cls, value))
|
|
385
526
|
|
|
386
527
|
@classmethod
|
|
387
|
-
def from_name(cls, name):
|
|
528
|
+
def from_name(cls, name: str) -> "ModelType":
|
|
388
529
|
r"""Returns the ModelType enum value from a string."""
|
|
389
530
|
for model_type in cls:
|
|
390
531
|
if model_type.value == name:
|
|
@@ -420,6 +561,7 @@ class ModelType(UnifiedModelType, Enum):
|
|
|
420
561
|
self.is_together,
|
|
421
562
|
self.is_sambanova,
|
|
422
563
|
self.is_groq,
|
|
564
|
+
self.is_cerebras,
|
|
423
565
|
self.is_openrouter,
|
|
424
566
|
self.is_lmstudio,
|
|
425
567
|
self.is_sglang,
|
|
@@ -445,13 +587,26 @@ class ModelType(UnifiedModelType, Enum):
|
|
|
445
587
|
ModelType.O1,
|
|
446
588
|
ModelType.O1_PREVIEW,
|
|
447
589
|
ModelType.O1_MINI,
|
|
590
|
+
ModelType.O3_PRO,
|
|
448
591
|
ModelType.O3_MINI,
|
|
449
592
|
ModelType.GPT_4_5_PREVIEW,
|
|
450
593
|
ModelType.GPT_4_1,
|
|
451
594
|
ModelType.GPT_4_1_MINI,
|
|
452
595
|
ModelType.GPT_4_1_NANO,
|
|
596
|
+
ModelType.GPT_5,
|
|
597
|
+
ModelType.GPT_5_MINI,
|
|
598
|
+
ModelType.GPT_5_NANO,
|
|
453
599
|
ModelType.O4_MINI,
|
|
454
600
|
ModelType.O3,
|
|
601
|
+
ModelType.GPT_5_1,
|
|
602
|
+
ModelType.GPT_5_2,
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
@property
|
|
606
|
+
def is_amd(self) -> bool:
|
|
607
|
+
r"""Returns whether this type of models is a AMD model."""
|
|
608
|
+
return self in {
|
|
609
|
+
ModelType.AMD_GPT4,
|
|
455
610
|
}
|
|
456
611
|
|
|
457
612
|
@property
|
|
@@ -466,6 +621,9 @@ class ModelType(UnifiedModelType, Enum):
|
|
|
466
621
|
ModelType.AWS_LLAMA_3_3_70B_INSTRUCT,
|
|
467
622
|
ModelType.AWS_LLAMA_3_2_90B_INSTRUCT,
|
|
468
623
|
ModelType.AWS_LLAMA_3_2_11B_INSTRUCT,
|
|
624
|
+
ModelType.AWS_CLAUDE_SONNET_4,
|
|
625
|
+
ModelType.AWS_CLAUDE_OPUS_4,
|
|
626
|
+
ModelType.AWS_CLAUDE_OPUS_4_1,
|
|
469
627
|
}
|
|
470
628
|
|
|
471
629
|
@property
|
|
@@ -483,10 +641,12 @@ class ModelType(UnifiedModelType, Enum):
|
|
|
483
641
|
ModelType.O1_PREVIEW,
|
|
484
642
|
ModelType.O1_MINI,
|
|
485
643
|
ModelType.O3_MINI,
|
|
644
|
+
ModelType.O3_PRO,
|
|
486
645
|
ModelType.GPT_4_5_PREVIEW,
|
|
487
646
|
ModelType.GPT_4_1,
|
|
488
647
|
ModelType.GPT_4_1_MINI,
|
|
489
648
|
ModelType.GPT_4_1_NANO,
|
|
649
|
+
ModelType.GPT_5,
|
|
490
650
|
ModelType.O4_MINI,
|
|
491
651
|
ModelType.O3,
|
|
492
652
|
}
|
|
@@ -527,6 +687,11 @@ class ModelType(UnifiedModelType, Enum):
|
|
|
527
687
|
ModelType.CLAUDE_3_5_SONNET,
|
|
528
688
|
ModelType.CLAUDE_3_5_HAIKU,
|
|
529
689
|
ModelType.CLAUDE_3_7_SONNET,
|
|
690
|
+
ModelType.CLAUDE_SONNET_4_5,
|
|
691
|
+
ModelType.CLAUDE_OPUS_4_5,
|
|
692
|
+
ModelType.CLAUDE_SONNET_4,
|
|
693
|
+
ModelType.CLAUDE_OPUS_4,
|
|
694
|
+
ModelType.CLAUDE_OPUS_4_1,
|
|
530
695
|
}
|
|
531
696
|
|
|
532
697
|
@property
|
|
@@ -535,11 +700,66 @@ class ModelType(UnifiedModelType, Enum):
|
|
|
535
700
|
return self in {
|
|
536
701
|
ModelType.GROQ_LLAMA_3_1_8B,
|
|
537
702
|
ModelType.GROQ_LLAMA_3_3_70B,
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
@property
|
|
706
|
+
def is_cerebras(self) -> bool:
|
|
707
|
+
r"""Returns whether this type of models is served by Cerebras."""
|
|
708
|
+
return self in {
|
|
709
|
+
ModelType.CEREBRAS_GPT_OSS_120B,
|
|
710
|
+
ModelType.CEREBRAS_LLAMA_3_1_8B,
|
|
711
|
+
ModelType.CEREBRAS_LLAMA_3_3_70B,
|
|
712
|
+
ModelType.CEREBRAS_QWEN_3_32B,
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
@property
|
|
716
|
+
def is_nebius(self) -> bool:
|
|
717
|
+
r"""Returns whether this type of models is served by Nebius AI
|
|
718
|
+
Studio."""
|
|
719
|
+
return self in {
|
|
720
|
+
ModelType.NEBIUS_GPT_OSS_120B,
|
|
721
|
+
ModelType.NEBIUS_GPT_OSS_20B,
|
|
722
|
+
ModelType.NEBIUS_GLM_4_5,
|
|
723
|
+
ModelType.NEBIUS_DEEPSEEK_V3,
|
|
724
|
+
ModelType.NEBIUS_DEEPSEEK_R1,
|
|
725
|
+
ModelType.NEBIUS_LLAMA_3_1_70B,
|
|
726
|
+
ModelType.NEBIUS_MISTRAL_7B_INSTRUCT,
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
@property
|
|
730
|
+
def is_cometapi(self) -> bool:
|
|
731
|
+
r"""Returns whether this type of models is served by CometAPI."""
|
|
732
|
+
return self in {
|
|
733
|
+
ModelType.COMETAPI_GPT_5_CHAT_LATEST,
|
|
734
|
+
ModelType.COMETAPI_CHATGPT_4O_LATEST,
|
|
735
|
+
ModelType.COMETAPI_GPT_5_MINI,
|
|
736
|
+
ModelType.COMETAPI_GPT_5_NANO,
|
|
737
|
+
ModelType.COMETAPI_GPT_5,
|
|
738
|
+
ModelType.COMETAPI_GPT_4_1,
|
|
739
|
+
ModelType.COMETAPI_GPT_4O_MINI,
|
|
740
|
+
ModelType.COMETAPI_O4_MINI_2025_04_16,
|
|
741
|
+
ModelType.COMETAPI_O3_PRO_2025_06_10,
|
|
742
|
+
ModelType.COMETAPI_CLAUDE_OPUS_4_1_20250805,
|
|
743
|
+
ModelType.COMETAPI_CLAUDE_OPUS_4_1_20250805_THINKING,
|
|
744
|
+
ModelType.COMETAPI_CLAUDE_SONNET_4_20250514,
|
|
745
|
+
ModelType.COMETAPI_CLAUDE_SONNET_4_20250514_THINKING,
|
|
746
|
+
ModelType.COMETAPI_CLAUDE_3_7_SONNET_LATEST,
|
|
747
|
+
ModelType.COMETAPI_CLAUDE_3_5_HAIKU_LATEST,
|
|
748
|
+
ModelType.COMETAPI_GEMINI_2_5_PRO,
|
|
749
|
+
ModelType.COMETAPI_GEMINI_2_5_FLASH,
|
|
750
|
+
ModelType.COMETAPI_GEMINI_2_5_FLASH_LITE,
|
|
751
|
+
ModelType.COMETAPI_GEMINI_2_0_FLASH,
|
|
752
|
+
ModelType.COMETAPI_GROK_4_0709,
|
|
753
|
+
ModelType.COMETAPI_GROK_3,
|
|
754
|
+
ModelType.COMETAPI_GROK_3_MINI,
|
|
755
|
+
ModelType.COMETAPI_GROK_2_IMAGE_1212,
|
|
756
|
+
ModelType.COMETAPI_DEEPSEEK_V3_1,
|
|
757
|
+
ModelType.COMETAPI_DEEPSEEK_V3,
|
|
758
|
+
ModelType.COMETAPI_DEEPSEEK_R1_0528,
|
|
759
|
+
ModelType.COMETAPI_DEEPSEEK_CHAT,
|
|
760
|
+
ModelType.COMETAPI_DEEPSEEK_REASONER,
|
|
761
|
+
ModelType.COMETAPI_QWEN3_30B_A3B,
|
|
762
|
+
ModelType.COMETAPI_QWEN3_CODER_PLUS_2025_07_22,
|
|
543
763
|
}
|
|
544
764
|
|
|
545
765
|
@property
|
|
@@ -553,6 +773,7 @@ class ModelType(UnifiedModelType, Enum):
|
|
|
553
773
|
ModelType.OPENROUTER_LLAMA_4_SCOUT,
|
|
554
774
|
ModelType.OPENROUTER_LLAMA_4_SCOUT_FREE,
|
|
555
775
|
ModelType.OPENROUTER_OLYMPICODER_7B,
|
|
776
|
+
ModelType.OPENROUTER_HORIZON_ALPHA,
|
|
556
777
|
}
|
|
557
778
|
|
|
558
779
|
@property
|
|
@@ -600,7 +821,10 @@ class ModelType(UnifiedModelType, Enum):
|
|
|
600
821
|
ModelType.MISTRAL_PIXTRAL_12B,
|
|
601
822
|
ModelType.MISTRAL_8B,
|
|
602
823
|
ModelType.MISTRAL_3B,
|
|
603
|
-
ModelType.
|
|
824
|
+
ModelType.MISTRAL_MEDIUM_3_1,
|
|
825
|
+
ModelType.MISTRAL_SMALL_3_2,
|
|
826
|
+
ModelType.MAGISTRAL_SMALL_1_2,
|
|
827
|
+
ModelType.MAGISTRAL_MEDIUM_1_2,
|
|
604
828
|
}
|
|
605
829
|
|
|
606
830
|
@property
|
|
@@ -629,12 +853,15 @@ class ModelType(UnifiedModelType, Enum):
|
|
|
629
853
|
bool: Whether this type of models is gemini.
|
|
630
854
|
"""
|
|
631
855
|
return self in {
|
|
632
|
-
ModelType.
|
|
856
|
+
ModelType.GEMINI_3_PRO,
|
|
857
|
+
ModelType.GEMINI_3_FLASH,
|
|
858
|
+
ModelType.GEMINI_2_5_FLASH,
|
|
859
|
+
ModelType.GEMINI_2_5_PRO,
|
|
633
860
|
ModelType.GEMINI_2_0_FLASH,
|
|
634
|
-
ModelType.
|
|
635
|
-
ModelType.GEMINI_1_5_PRO,
|
|
861
|
+
ModelType.GEMINI_2_0_FLASH_EXP,
|
|
636
862
|
ModelType.GEMINI_2_0_FLASH_THINKING,
|
|
637
863
|
ModelType.GEMINI_2_0_PRO_EXP,
|
|
864
|
+
ModelType.GEMINI_2_0_FLASH_LITE,
|
|
638
865
|
ModelType.GEMINI_2_0_FLASH_LITE_PREVIEW,
|
|
639
866
|
}
|
|
640
867
|
|
|
@@ -709,6 +936,7 @@ class ModelType(UnifiedModelType, Enum):
|
|
|
709
936
|
ModelType.QWEN_PLUS_2025_04_28,
|
|
710
937
|
ModelType.QWEN_TURBO_LATEST,
|
|
711
938
|
ModelType.QWEN_TURBO_2025_04_28,
|
|
939
|
+
ModelType.QWEN_3_CODER_PLUS,
|
|
712
940
|
}
|
|
713
941
|
|
|
714
942
|
@property
|
|
@@ -775,6 +1003,7 @@ class ModelType(UnifiedModelType, Enum):
|
|
|
775
1003
|
ModelType.MODELSCOPE_LLAMA_3_3_70B_INSTRUCT,
|
|
776
1004
|
ModelType.MODELSCOPE_MINISTRAL_8B_INSTRUCT,
|
|
777
1005
|
ModelType.MODELSCOPE_DEEPSEEK_V3_0324,
|
|
1006
|
+
ModelType.MODELSCOPE_ERNIE_4_5_VL_28B_A3B_THINKING,
|
|
778
1007
|
}
|
|
779
1008
|
|
|
780
1009
|
@property
|
|
@@ -783,6 +1012,7 @@ class ModelType(UnifiedModelType, Enum):
|
|
|
783
1012
|
ModelType.MOONSHOT_V1_8K,
|
|
784
1013
|
ModelType.MOONSHOT_V1_32K,
|
|
785
1014
|
ModelType.MOONSHOT_V1_128K,
|
|
1015
|
+
ModelType.MOONSHOT_KIMI_K2,
|
|
786
1016
|
}
|
|
787
1017
|
|
|
788
1018
|
@property
|
|
@@ -804,9 +1034,19 @@ class ModelType(UnifiedModelType, Enum):
|
|
|
804
1034
|
return self in {
|
|
805
1035
|
ModelType.SILICONFLOW_DEEPSEEK_V2_5,
|
|
806
1036
|
ModelType.SILICONFLOW_DEEPSEEK_V3,
|
|
1037
|
+
ModelType.SILICONFLOW_PRO_DEEPSEEK_V3,
|
|
1038
|
+
ModelType.SILICONFLOW_DEEPSEEK_R1,
|
|
1039
|
+
ModelType.SILICONFLOW_PRO_DEEPSEEK_R1,
|
|
1040
|
+
ModelType.SILICONFLOW_DEEPSEEK_R1_DISTILL_QWEN_32B,
|
|
1041
|
+
ModelType.SILICONFLOW_DEEPSEEK_R1_DISTILL_QWEN_14B,
|
|
1042
|
+
ModelType.SILICONFLOW_DEEPSEEK_R1_DISTILL_QWEN_7B,
|
|
1043
|
+
ModelType.SILICONFLOW_DEEPSEEK_R1_DISTILL_QWEN_1_5B,
|
|
1044
|
+
ModelType.SILICONFLOW_PRO_DEEPSEEK_R1_DISTILL_QWEN_7B,
|
|
1045
|
+
ModelType.SILICONFLOW_PRO_DEEPSEEK_R1_DISTILL_QWEN_1_5B,
|
|
807
1046
|
ModelType.SILICONFLOW_INTERN_LM2_5_20B_CHAT,
|
|
808
1047
|
ModelType.SILICONFLOW_INTERN_LM2_5_7B_CHAT,
|
|
809
1048
|
ModelType.SILICONFLOW_PRO_INTERN_LM2_5_7B_CHAT,
|
|
1049
|
+
ModelType.SILICONFLOW_QWQ_32B,
|
|
810
1050
|
ModelType.SILICONFLOW_QWEN2_5_72B_INSTRUCT,
|
|
811
1051
|
ModelType.SILICONFLOW_QWEN2_5_32B_INSTRUCT,
|
|
812
1052
|
ModelType.SILICONFLOW_QWEN2_5_14B_INSTRUCT,
|
|
@@ -814,6 +1054,10 @@ class ModelType(UnifiedModelType, Enum):
|
|
|
814
1054
|
ModelType.SILICONFLOW_PRO_QWEN2_5_7B_INSTRUCT,
|
|
815
1055
|
ModelType.SILICONFLOW_THUDM_GLM_4_9B_CHAT,
|
|
816
1056
|
ModelType.SILICONFLOW_PRO_THUDM_GLM_4_9B_CHAT,
|
|
1057
|
+
ModelType.SILICONFLOW_THUDM_GLM_Z1_32B_0414,
|
|
1058
|
+
ModelType.SILICONFLOW_THUDM_GLM_4_32B_0414,
|
|
1059
|
+
ModelType.SILICONFLOW_THUDM_GLM_Z1_RUMINATION_32B_0414,
|
|
1060
|
+
ModelType.SILICONFLOW_THUDM_GLM_4_9B_0414,
|
|
817
1061
|
}
|
|
818
1062
|
|
|
819
1063
|
@property
|
|
@@ -829,6 +1073,21 @@ class ModelType(UnifiedModelType, Enum):
|
|
|
829
1073
|
ModelType.WATSONX_MISTRAL_LARGE,
|
|
830
1074
|
}
|
|
831
1075
|
|
|
1076
|
+
@property
|
|
1077
|
+
def is_qianfan(self) -> bool:
|
|
1078
|
+
return self in {
|
|
1079
|
+
ModelType.ERNIE_X1_TURBO_32K,
|
|
1080
|
+
ModelType.ERNIE_X1_32K,
|
|
1081
|
+
ModelType.ERNIE_X1_32K_PREVIEW,
|
|
1082
|
+
ModelType.ERNIE_4_5_TURBO_128K,
|
|
1083
|
+
ModelType.ERNIE_4_5_TURBO_32K,
|
|
1084
|
+
ModelType.DEEPSEEK_V3,
|
|
1085
|
+
ModelType.DEEPSEEK_R1,
|
|
1086
|
+
ModelType.QWEN3_235B_A22B,
|
|
1087
|
+
ModelType.ERNIE_5_0_THINKING,
|
|
1088
|
+
ModelType.ERNIE_4_5_TURBO_VL,
|
|
1089
|
+
}
|
|
1090
|
+
|
|
832
1091
|
@property
|
|
833
1092
|
def is_novita(self) -> bool:
|
|
834
1093
|
return self in {
|
|
@@ -877,6 +1136,20 @@ class ModelType(UnifiedModelType, Enum):
|
|
|
877
1136
|
ModelType.NOVITA_L31_70B_EURYALE_V2_2,
|
|
878
1137
|
}
|
|
879
1138
|
|
|
1139
|
+
@property
|
|
1140
|
+
def is_crynux(self) -> bool:
|
|
1141
|
+
return self in {
|
|
1142
|
+
ModelType.CRYNUX_DEEPSEEK_R1_DISTILL_QWEN_1_5B,
|
|
1143
|
+
ModelType.CRYNUX_DEEPSEEK_R1_DISTILL_QWEN_7B,
|
|
1144
|
+
ModelType.CRYNUX_DEEPSEEK_R1_DISTILL_LLAMA_8B,
|
|
1145
|
+
ModelType.CRYNUX_QWEN_3_4_B,
|
|
1146
|
+
ModelType.CRYNUX_QWEN_3_8_B,
|
|
1147
|
+
ModelType.CRYNUX_QWEN_2_5_7B,
|
|
1148
|
+
ModelType.CRYNUX_QWEN_2_5_7B_INSTRUCT,
|
|
1149
|
+
ModelType.CRYNUX_NOUS_HERMES_3_LLAMA_3_1_8B,
|
|
1150
|
+
ModelType.CRYNUX_NOUS_HERMES_3_LLAMA_3_2_3B,
|
|
1151
|
+
}
|
|
1152
|
+
|
|
880
1153
|
@property
|
|
881
1154
|
def is_aiml(self) -> bool:
|
|
882
1155
|
return self in {
|
|
@@ -910,11 +1183,8 @@ class ModelType(UnifiedModelType, Enum):
|
|
|
910
1183
|
}:
|
|
911
1184
|
return 4_096
|
|
912
1185
|
elif self in {
|
|
1186
|
+
ModelType.CEREBRAS_LLAMA_3_1_8B,
|
|
913
1187
|
ModelType.GPT_4,
|
|
914
|
-
ModelType.GROQ_LLAMA_3_8B,
|
|
915
|
-
ModelType.GROQ_LLAMA_3_70B,
|
|
916
|
-
ModelType.GROQ_LLAMA_3_3_70B_PREVIEW,
|
|
917
|
-
ModelType.GROQ_GEMMA_2_9B_IT,
|
|
918
1188
|
ModelType.GLM_3_TURBO,
|
|
919
1189
|
ModelType.GLM_4,
|
|
920
1190
|
ModelType.QWEN_VL_PLUS,
|
|
@@ -977,13 +1247,26 @@ class ModelType(UnifiedModelType, Enum):
|
|
|
977
1247
|
ModelType.NOVITA_GLM_4_32B_0414,
|
|
978
1248
|
ModelType.NOVITA_GLM_Z1_RUMINATION_32B_0414,
|
|
979
1249
|
ModelType.NOVITA_QWEN_2_5_7B,
|
|
1250
|
+
ModelType.CRYNUX_DEEPSEEK_R1_DISTILL_QWEN_1_5B,
|
|
1251
|
+
ModelType.CRYNUX_DEEPSEEK_R1_DISTILL_QWEN_7B,
|
|
1252
|
+
ModelType.CRYNUX_DEEPSEEK_R1_DISTILL_LLAMA_8B,
|
|
1253
|
+
ModelType.CRYNUX_QWEN_3_4_B,
|
|
1254
|
+
ModelType.CRYNUX_QWEN_3_8_B,
|
|
1255
|
+
ModelType.CRYNUX_QWEN_2_5_7B,
|
|
1256
|
+
ModelType.CRYNUX_QWEN_2_5_7B_INSTRUCT,
|
|
1257
|
+
ModelType.CRYNUX_NOUS_HERMES_3_LLAMA_3_1_8B,
|
|
1258
|
+
ModelType.CRYNUX_NOUS_HERMES_3_LLAMA_3_2_3B,
|
|
1259
|
+
ModelType.ERNIE_X1_TURBO_32K,
|
|
1260
|
+
ModelType.ERNIE_X1_32K,
|
|
1261
|
+
ModelType.ERNIE_X1_32K_PREVIEW,
|
|
1262
|
+
ModelType.ERNIE_4_5_TURBO_32K,
|
|
1263
|
+
ModelType.QWEN3_235B_A22B,
|
|
980
1264
|
}:
|
|
981
1265
|
return 32_000
|
|
982
1266
|
elif self in {
|
|
983
1267
|
ModelType.MISTRAL_CODESTRAL,
|
|
984
1268
|
ModelType.MISTRAL_7B,
|
|
985
1269
|
ModelType.MISTRAL_MIXTRAL_8x7B,
|
|
986
|
-
ModelType.GROQ_MIXTRAL_8_7B,
|
|
987
1270
|
ModelType.YI_LARGE,
|
|
988
1271
|
ModelType.YI_LARGE_FC,
|
|
989
1272
|
ModelType.QWEN_MAX,
|
|
@@ -1029,10 +1312,23 @@ class ModelType(UnifiedModelType, Enum):
|
|
|
1029
1312
|
ModelType.NOVITA_MISTRAL_7B,
|
|
1030
1313
|
ModelType.NOVITA_LLAMA_3_2_11B_VISION,
|
|
1031
1314
|
ModelType.NOVITA_LLAMA_3_2_3B,
|
|
1315
|
+
ModelType.NEBIUS_MISTRAL_7B_INSTRUCT,
|
|
1316
|
+
ModelType.SILICONFLOW_INTERN_LM2_5_20B_CHAT,
|
|
1317
|
+
ModelType.SILICONFLOW_INTERN_LM2_5_7B_CHAT,
|
|
1318
|
+
ModelType.SILICONFLOW_PRO_INTERN_LM2_5_7B_CHAT,
|
|
1319
|
+
ModelType.SILICONFLOW_QWQ_32B,
|
|
1320
|
+
ModelType.SILICONFLOW_QWEN2_5_72B_INSTRUCT,
|
|
1321
|
+
ModelType.SILICONFLOW_QWEN2_5_32B_INSTRUCT,
|
|
1322
|
+
ModelType.SILICONFLOW_QWEN2_5_14B_INSTRUCT,
|
|
1323
|
+
ModelType.SILICONFLOW_QWEN2_5_7B_INSTRUCT,
|
|
1324
|
+
ModelType.SILICONFLOW_PRO_QWEN2_5_7B_INSTRUCT,
|
|
1032
1325
|
}:
|
|
1033
1326
|
return 32_768
|
|
1034
1327
|
elif self in {
|
|
1035
1328
|
ModelType.MISTRAL_MIXTRAL_8x22B,
|
|
1329
|
+
ModelType.CEREBRAS_GPT_OSS_120B,
|
|
1330
|
+
ModelType.CEREBRAS_LLAMA_3_3_70B,
|
|
1331
|
+
ModelType.CEREBRAS_QWEN_3_32B,
|
|
1036
1332
|
ModelType.DEEPSEEK_CHAT,
|
|
1037
1333
|
ModelType.DEEPSEEK_REASONER,
|
|
1038
1334
|
ModelType.PPIO_DEEPSEEK_R1_TURBO,
|
|
@@ -1049,6 +1345,17 @@ class ModelType(UnifiedModelType, Enum):
|
|
|
1049
1345
|
ModelType.NOVITA_DEEPSEEK_R1_DISTILL_QWEN_14B,
|
|
1050
1346
|
ModelType.NOVITA_DEEPSEEK_R1_DISTILL_QWEN_32B,
|
|
1051
1347
|
ModelType.NOVITA_DEEPSEEK_R1,
|
|
1348
|
+
ModelType.SILICONFLOW_DEEPSEEK_V2_5,
|
|
1349
|
+
ModelType.SILICONFLOW_DEEPSEEK_V3,
|
|
1350
|
+
ModelType.SILICONFLOW_PRO_DEEPSEEK_V3,
|
|
1351
|
+
ModelType.SILICONFLOW_DEEPSEEK_R1,
|
|
1352
|
+
ModelType.SILICONFLOW_PRO_DEEPSEEK_R1,
|
|
1353
|
+
ModelType.SILICONFLOW_DEEPSEEK_R1_DISTILL_QWEN_32B,
|
|
1354
|
+
ModelType.SILICONFLOW_DEEPSEEK_R1_DISTILL_QWEN_14B,
|
|
1355
|
+
ModelType.SILICONFLOW_DEEPSEEK_R1_DISTILL_QWEN_7B,
|
|
1356
|
+
ModelType.SILICONFLOW_DEEPSEEK_R1_DISTILL_QWEN_1_5B,
|
|
1357
|
+
ModelType.SILICONFLOW_PRO_DEEPSEEK_R1_DISTILL_QWEN_7B,
|
|
1358
|
+
ModelType.SILICONFLOW_PRO_DEEPSEEK_R1_DISTILL_QWEN_1_5B,
|
|
1052
1359
|
}:
|
|
1053
1360
|
return 64_000
|
|
1054
1361
|
elif self in {
|
|
@@ -1057,6 +1364,7 @@ class ModelType(UnifiedModelType, Enum):
|
|
|
1057
1364
|
return 65_535
|
|
1058
1365
|
elif self in {
|
|
1059
1366
|
ModelType.NOVITA_QWEN_2_5_V1_72B,
|
|
1367
|
+
ModelType.DEEPSEEK_R1,
|
|
1060
1368
|
}:
|
|
1061
1369
|
return 96_000
|
|
1062
1370
|
elif self in {
|
|
@@ -1076,6 +1384,8 @@ class ModelType(UnifiedModelType, Enum):
|
|
|
1076
1384
|
ModelType.MISTRAL_PIXTRAL_12B,
|
|
1077
1385
|
ModelType.MISTRAL_8B,
|
|
1078
1386
|
ModelType.MISTRAL_3B,
|
|
1387
|
+
ModelType.MISTRAL_SMALL_3_2,
|
|
1388
|
+
ModelType.MAGISTRAL_SMALL_1_2,
|
|
1079
1389
|
ModelType.QWEN_2_5_CODER_32B,
|
|
1080
1390
|
ModelType.QWEN_2_5_VL_72B,
|
|
1081
1391
|
ModelType.QWEN_2_5_72B,
|
|
@@ -1109,7 +1419,55 @@ class ModelType(UnifiedModelType, Enum):
|
|
|
1109
1419
|
ModelType.NETMIND_DEEPSEEK_R1,
|
|
1110
1420
|
ModelType.NETMIND_DEEPSEEK_V3,
|
|
1111
1421
|
ModelType.NOVITA_DEEPSEEK_V3_0324,
|
|
1112
|
-
ModelType.
|
|
1422
|
+
ModelType.MISTRAL_MEDIUM_3_1,
|
|
1423
|
+
ModelType.MAGISTRAL_MEDIUM_1_2,
|
|
1424
|
+
ModelType.ERNIE_4_5_TURBO_128K,
|
|
1425
|
+
ModelType.DEEPSEEK_V3,
|
|
1426
|
+
ModelType.MOONSHOT_KIMI_K2,
|
|
1427
|
+
ModelType.NEBIUS_GLM_4_5,
|
|
1428
|
+
ModelType.NEBIUS_DEEPSEEK_V3,
|
|
1429
|
+
ModelType.NEBIUS_DEEPSEEK_R1,
|
|
1430
|
+
ModelType.NEBIUS_GPT_OSS_120B,
|
|
1431
|
+
ModelType.NEBIUS_GPT_OSS_20B,
|
|
1432
|
+
ModelType.COMETAPI_GPT_5_CHAT_LATEST,
|
|
1433
|
+
ModelType.COMETAPI_CHATGPT_4O_LATEST,
|
|
1434
|
+
ModelType.COMETAPI_GPT_5_MINI,
|
|
1435
|
+
ModelType.COMETAPI_GPT_5_NANO,
|
|
1436
|
+
ModelType.COMETAPI_GPT_5,
|
|
1437
|
+
ModelType.COMETAPI_GPT_4_1,
|
|
1438
|
+
ModelType.COMETAPI_GPT_4O_MINI,
|
|
1439
|
+
ModelType.COMETAPI_O4_MINI_2025_04_16,
|
|
1440
|
+
ModelType.COMETAPI_O3_PRO_2025_06_10,
|
|
1441
|
+
ModelType.COMETAPI_CLAUDE_OPUS_4_1_20250805,
|
|
1442
|
+
ModelType.COMETAPI_CLAUDE_OPUS_4_1_20250805_THINKING,
|
|
1443
|
+
ModelType.COMETAPI_CLAUDE_SONNET_4_20250514,
|
|
1444
|
+
ModelType.COMETAPI_CLAUDE_SONNET_4_20250514_THINKING,
|
|
1445
|
+
ModelType.COMETAPI_CLAUDE_3_7_SONNET_LATEST,
|
|
1446
|
+
ModelType.COMETAPI_CLAUDE_3_5_HAIKU_LATEST,
|
|
1447
|
+
ModelType.COMETAPI_GEMINI_2_5_PRO,
|
|
1448
|
+
ModelType.COMETAPI_GEMINI_2_5_FLASH,
|
|
1449
|
+
ModelType.COMETAPI_GEMINI_2_5_FLASH_LITE,
|
|
1450
|
+
ModelType.COMETAPI_GEMINI_2_0_FLASH,
|
|
1451
|
+
ModelType.COMETAPI_GROK_4_0709,
|
|
1452
|
+
ModelType.COMETAPI_GROK_3,
|
|
1453
|
+
ModelType.COMETAPI_GROK_3_MINI,
|
|
1454
|
+
ModelType.COMETAPI_GROK_2_IMAGE_1212,
|
|
1455
|
+
ModelType.COMETAPI_DEEPSEEK_V3_1,
|
|
1456
|
+
ModelType.COMETAPI_DEEPSEEK_V3,
|
|
1457
|
+
ModelType.COMETAPI_DEEPSEEK_R1_0528,
|
|
1458
|
+
ModelType.COMETAPI_DEEPSEEK_CHAT,
|
|
1459
|
+
ModelType.COMETAPI_DEEPSEEK_REASONER,
|
|
1460
|
+
ModelType.COMETAPI_QWEN3_30B_A3B,
|
|
1461
|
+
ModelType.COMETAPI_QWEN3_CODER_PLUS_2025_07_22,
|
|
1462
|
+
ModelType.SILICONFLOW_THUDM_GLM_4_9B_CHAT,
|
|
1463
|
+
ModelType.SILICONFLOW_PRO_THUDM_GLM_4_9B_CHAT,
|
|
1464
|
+
ModelType.SILICONFLOW_THUDM_GLM_Z1_32B_0414,
|
|
1465
|
+
ModelType.SILICONFLOW_THUDM_GLM_4_32B_0414,
|
|
1466
|
+
ModelType.SILICONFLOW_THUDM_GLM_Z1_RUMINATION_32B_0414,
|
|
1467
|
+
ModelType.SILICONFLOW_THUDM_GLM_4_9B_0414,
|
|
1468
|
+
ModelType.MODELSCOPE_ERNIE_4_5_VL_28B_A3B_THINKING,
|
|
1469
|
+
ModelType.ERNIE_5_0_THINKING,
|
|
1470
|
+
ModelType.ERNIE_4_5_TURBO_VL,
|
|
1113
1471
|
}:
|
|
1114
1472
|
return 128_000
|
|
1115
1473
|
elif self in {
|
|
@@ -1144,11 +1502,13 @@ class ModelType(UnifiedModelType, Enum):
|
|
|
1144
1502
|
ModelType.NOVITA_LLAMA_4_SCOUT_17B,
|
|
1145
1503
|
ModelType.NOVITA_LLAMA_3_3_70B,
|
|
1146
1504
|
ModelType.NOVITA_MISTRAL_NEMO,
|
|
1505
|
+
ModelType.NEBIUS_LLAMA_3_1_70B,
|
|
1147
1506
|
}:
|
|
1148
1507
|
return 131_072
|
|
1149
1508
|
elif self in {
|
|
1150
1509
|
ModelType.O1,
|
|
1151
1510
|
ModelType.O3_MINI,
|
|
1511
|
+
ModelType.O3_PRO,
|
|
1152
1512
|
ModelType.CLAUDE_2_1,
|
|
1153
1513
|
ModelType.CLAUDE_3_OPUS,
|
|
1154
1514
|
ModelType.CLAUDE_3_SONNET,
|
|
@@ -1156,11 +1516,19 @@ class ModelType(UnifiedModelType, Enum):
|
|
|
1156
1516
|
ModelType.CLAUDE_3_5_SONNET,
|
|
1157
1517
|
ModelType.CLAUDE_3_5_HAIKU,
|
|
1158
1518
|
ModelType.CLAUDE_3_7_SONNET,
|
|
1519
|
+
ModelType.CLAUDE_SONNET_4_5,
|
|
1520
|
+
ModelType.CLAUDE_OPUS_4_5,
|
|
1521
|
+
ModelType.CLAUDE_SONNET_4,
|
|
1522
|
+
ModelType.CLAUDE_OPUS_4,
|
|
1523
|
+
ModelType.CLAUDE_OPUS_4_1,
|
|
1159
1524
|
ModelType.YI_MEDIUM_200K,
|
|
1160
1525
|
ModelType.AWS_CLAUDE_3_5_SONNET,
|
|
1161
1526
|
ModelType.AWS_CLAUDE_3_HAIKU,
|
|
1162
1527
|
ModelType.AWS_CLAUDE_3_SONNET,
|
|
1163
1528
|
ModelType.AWS_CLAUDE_3_7_SONNET,
|
|
1529
|
+
ModelType.AWS_CLAUDE_SONNET_4,
|
|
1530
|
+
ModelType.AWS_CLAUDE_OPUS_4,
|
|
1531
|
+
ModelType.AWS_CLAUDE_OPUS_4_1,
|
|
1164
1532
|
ModelType.O4_MINI,
|
|
1165
1533
|
ModelType.O3,
|
|
1166
1534
|
}:
|
|
@@ -1168,6 +1536,7 @@ class ModelType(UnifiedModelType, Enum):
|
|
|
1168
1536
|
elif self in {
|
|
1169
1537
|
ModelType.MISTRAL_CODESTRAL_MAMBA,
|
|
1170
1538
|
ModelType.OPENROUTER_LLAMA_4_MAVERICK_FREE,
|
|
1539
|
+
ModelType.OPENROUTER_HORIZON_ALPHA,
|
|
1171
1540
|
}:
|
|
1172
1541
|
return 256_000
|
|
1173
1542
|
|
|
@@ -1175,33 +1544,55 @@ class ModelType(UnifiedModelType, Enum):
|
|
|
1175
1544
|
ModelType.NETMIND_LLAMA_4_SCOUT_17B_16E_INSTRUCT,
|
|
1176
1545
|
}:
|
|
1177
1546
|
return 320_000
|
|
1547
|
+
elif self in {
|
|
1548
|
+
ModelType.GPT_5_1,
|
|
1549
|
+
ModelType.GPT_5_2,
|
|
1550
|
+
ModelType.GPT_5_MINI,
|
|
1551
|
+
ModelType.GPT_5_NANO,
|
|
1552
|
+
ModelType.GPT_5,
|
|
1553
|
+
}:
|
|
1554
|
+
return 400_000
|
|
1178
1555
|
elif self in {
|
|
1179
1556
|
ModelType.OPENROUTER_LLAMA_4_SCOUT_FREE,
|
|
1180
1557
|
ModelType.NETMIND_LLAMA_4_MAVERICK_17B_128E_INSTRUCT,
|
|
1181
1558
|
}:
|
|
1182
1559
|
return 512_000
|
|
1183
1560
|
elif self in {
|
|
1184
|
-
ModelType.
|
|
1561
|
+
ModelType.GEMINI_3_PRO,
|
|
1562
|
+
ModelType.GEMINI_3_FLASH,
|
|
1563
|
+
ModelType.GEMINI_2_5_FLASH,
|
|
1564
|
+
ModelType.GEMINI_2_5_PRO,
|
|
1185
1565
|
ModelType.GEMINI_2_0_FLASH,
|
|
1186
|
-
ModelType.
|
|
1187
|
-
ModelType.GEMINI_1_5_PRO,
|
|
1566
|
+
ModelType.GEMINI_2_0_FLASH_EXP,
|
|
1188
1567
|
ModelType.GEMINI_2_0_FLASH_THINKING,
|
|
1568
|
+
ModelType.GEMINI_2_0_FLASH_LITE,
|
|
1189
1569
|
ModelType.GEMINI_2_0_FLASH_LITE_PREVIEW,
|
|
1190
1570
|
ModelType.GEMINI_2_0_PRO_EXP, # Not given in doc, assume the same
|
|
1191
1571
|
ModelType.GLM_4_LONG,
|
|
1192
1572
|
ModelType.TOGETHER_LLAMA_4_MAVERICK,
|
|
1193
1573
|
ModelType.OPENROUTER_LLAMA_4_MAVERICK,
|
|
1574
|
+
ModelType.AMD_GPT4,
|
|
1194
1575
|
ModelType.GPT_4_1,
|
|
1195
1576
|
ModelType.GPT_4_1_MINI,
|
|
1196
1577
|
ModelType.GPT_4_1_NANO,
|
|
1197
1578
|
ModelType.NOVITA_LLAMA_4_MAVERICK_17B,
|
|
1198
1579
|
}:
|
|
1199
1580
|
return 1_048_576
|
|
1581
|
+
elif self in {
|
|
1582
|
+
ModelType.QWEN_3_CODER_PLUS,
|
|
1583
|
+
}:
|
|
1584
|
+
return 1_000_000
|
|
1200
1585
|
elif self in {
|
|
1201
1586
|
ModelType.QWEN_LONG,
|
|
1202
1587
|
ModelType.TOGETHER_LLAMA_4_SCOUT,
|
|
1203
1588
|
}:
|
|
1204
1589
|
return 10_000_000
|
|
1590
|
+
elif self in {
|
|
1591
|
+
ModelType.MINIMAX_M2,
|
|
1592
|
+
ModelType.MINIMAX_M2_STABLE,
|
|
1593
|
+
}:
|
|
1594
|
+
return 32_000
|
|
1595
|
+
|
|
1205
1596
|
else:
|
|
1206
1597
|
logger.warning(
|
|
1207
1598
|
f"Unknown model type {self}, set maximum token limit "
|
|
@@ -1399,6 +1790,8 @@ class ModelPlatformType(Enum):
|
|
|
1399
1790
|
AZURE = "azure"
|
|
1400
1791
|
ANTHROPIC = "anthropic"
|
|
1401
1792
|
GROQ = "groq"
|
|
1793
|
+
NEBIUS = "nebius"
|
|
1794
|
+
COMETAPI = "cometapi"
|
|
1402
1795
|
OPENROUTER = "openrouter"
|
|
1403
1796
|
OLLAMA = "ollama"
|
|
1404
1797
|
LITELLM = "litellm"
|
|
@@ -1415,6 +1808,7 @@ class ModelPlatformType(Enum):
|
|
|
1415
1808
|
COHERE = "cohere"
|
|
1416
1809
|
YI = "lingyiwanwu"
|
|
1417
1810
|
QWEN = "tongyi-qianwen"
|
|
1811
|
+
AMD = "amd"
|
|
1418
1812
|
NVIDIA = "nvidia"
|
|
1419
1813
|
DEEPSEEK = "deepseek"
|
|
1420
1814
|
PPIO = "ppio"
|
|
@@ -1428,6 +1822,11 @@ class ModelPlatformType(Enum):
|
|
|
1428
1822
|
NETMIND = "netmind"
|
|
1429
1823
|
NOVITA = "novita"
|
|
1430
1824
|
WATSONX = "watsonx"
|
|
1825
|
+
QIANFAN = "qianfan"
|
|
1826
|
+
CRYNUX = "crynux"
|
|
1827
|
+
AIHUBMIX = "aihubmix"
|
|
1828
|
+
MINIMAX = "minimax"
|
|
1829
|
+
CEREBRAS = "cerebras"
|
|
1431
1830
|
|
|
1432
1831
|
@classmethod
|
|
1433
1832
|
def from_name(cls, name):
|
|
@@ -1603,6 +2002,26 @@ class ModelPlatformType(Enum):
|
|
|
1603
2002
|
r"""Returns whether this platform is WatsonX."""
|
|
1604
2003
|
return self is ModelPlatformType.WATSONX
|
|
1605
2004
|
|
|
2005
|
+
@property
|
|
2006
|
+
def is_crynux(self) -> bool:
|
|
2007
|
+
r"""Returns whether this platform is Crynux."""
|
|
2008
|
+
return self is ModelPlatformType.CRYNUX
|
|
2009
|
+
|
|
2010
|
+
@property
|
|
2011
|
+
def is_aihubmix(self) -> bool:
|
|
2012
|
+
r"""Returns whether this platform is AihubMix."""
|
|
2013
|
+
return self is ModelPlatformType.AIHUBMIX
|
|
2014
|
+
|
|
2015
|
+
@property
|
|
2016
|
+
def is_minimax(self) -> bool:
|
|
2017
|
+
r"""Returns whether this platform is Minimax M2."""
|
|
2018
|
+
return self is ModelPlatformType.MINIMAX
|
|
2019
|
+
|
|
2020
|
+
@property
|
|
2021
|
+
def is_cerebras(self) -> bool:
|
|
2022
|
+
r"""Returns whether this platform is Cerebras."""
|
|
2023
|
+
return self is ModelPlatformType.CEREBRAS
|
|
2024
|
+
|
|
1606
2025
|
|
|
1607
2026
|
class AudioModelType(Enum):
|
|
1608
2027
|
TTS_1 = "tts-1"
|