kiapi 0.7.0__tar.gz → 0.8.0__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.
- {kiapi-0.7.0 → kiapi-0.8.0}/.gitignore +3 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/PKG-INFO +46 -3
- {kiapi-0.7.0 → kiapi-0.8.0}/README.md +44 -1
- {kiapi-0.7.0 → kiapi-0.8.0}/pyproject.toml +17 -4
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/api/app.py +8 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/api/chat/_views/chat_completion_response.py +9 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/api/chat/router.py +59 -10
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/api/image/qwen/router.py +12 -10
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/api/models/_schemas/openai_model_spec.py +8 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/api/models/router.py +6 -1
- kiapi-0.8.0/src/kiapi/api/setup/_helpers/build_setup_response.py +65 -0
- kiapi-0.8.0/src/kiapi/api/setup/_views/setup_model_state.py +31 -0
- kiapi-0.8.0/src/kiapi/api/setup/_views/setup_resource_state.py +34 -0
- kiapi-0.8.0/src/kiapi/api/setup/_views/setup_response.py +17 -0
- kiapi-0.8.0/src/kiapi/api/setup/_views/setup_summary.py +28 -0
- kiapi-0.8.0/src/kiapi/api/setup/router.py +22 -0
- kiapi-0.8.0/src/kiapi/api/ui/router.py +33 -0
- kiapi-0.8.0/src/kiapi/api/ui/static/_ui/favicon-xDMmydtu.svg +1 -0
- kiapi-0.8.0/src/kiapi/api/ui/static/_ui/geist-mono-cyrillic-400-normal-C51Di1Mf.woff2 +0 -0
- kiapi-0.8.0/src/kiapi/api/ui/static/_ui/geist-mono-cyrillic-400-normal-CPJFfJgk.woff +0 -0
- kiapi-0.8.0/src/kiapi/api/ui/static/_ui/geist-mono-cyrillic-500-normal-D2cXvDHF.woff2 +0 -0
- kiapi-0.8.0/src/kiapi/api/ui/static/_ui/geist-mono-cyrillic-500-normal-DfuvdVgn.woff +0 -0
- kiapi-0.8.0/src/kiapi/api/ui/static/_ui/geist-mono-latin-400-normal-B2yvC1Cq.woff +0 -0
- kiapi-0.8.0/src/kiapi/api/ui/static/_ui/geist-mono-latin-400-normal-DTRLJnHl.woff2 +0 -0
- kiapi-0.8.0/src/kiapi/api/ui/static/_ui/geist-mono-latin-500-normal-D-GG86Jb.woff +0 -0
- kiapi-0.8.0/src/kiapi/api/ui/static/_ui/geist-mono-latin-500-normal-YINYabwD.woff2 +0 -0
- kiapi-0.8.0/src/kiapi/api/ui/static/_ui/geist-mono-latin-ext-400-normal-CfzLURNc.woff +0 -0
- kiapi-0.8.0/src/kiapi/api/ui/static/_ui/geist-mono-latin-ext-400-normal-DI-rJ0UV.woff2 +0 -0
- kiapi-0.8.0/src/kiapi/api/ui/static/_ui/geist-mono-latin-ext-500-normal-Buglb9-a.woff2 +0 -0
- kiapi-0.8.0/src/kiapi/api/ui/static/_ui/geist-mono-latin-ext-500-normal-CrWEgvU_.woff +0 -0
- kiapi-0.8.0/src/kiapi/api/ui/static/_ui/geist-mono-symbols2-400-normal-DjbiTEEA.woff +0 -0
- kiapi-0.8.0/src/kiapi/api/ui/static/_ui/geist-mono-symbols2-500-normal-CmnCPGa0.woff +0 -0
- kiapi-0.8.0/src/kiapi/api/ui/static/_ui/geist-mono-vietnamese-400-normal-CZEPLOgu.woff +0 -0
- kiapi-0.8.0/src/kiapi/api/ui/static/_ui/geist-mono-vietnamese-500-normal-Dx9-epDo.woff +0 -0
- kiapi-0.8.0/src/kiapi/api/ui/static/_ui/geist-sans-latin-400-normal-BOaIZNA2.woff +0 -0
- kiapi-0.8.0/src/kiapi/api/ui/static/_ui/geist-sans-latin-400-normal-gapTbOY8.woff2 +0 -0
- kiapi-0.8.0/src/kiapi/api/ui/static/_ui/geist-sans-latin-500-normal-CN2lyvyL.woff +0 -0
- kiapi-0.8.0/src/kiapi/api/ui/static/_ui/geist-sans-latin-500-normal-uokXdC-Q.woff2 +0 -0
- kiapi-0.8.0/src/kiapi/api/ui/static/_ui/geist-sans-latin-600-normal-CA1yjETN.woff +0 -0
- kiapi-0.8.0/src/kiapi/api/ui/static/_ui/geist-sans-latin-600-normal-DFOURf8L.woff2 +0 -0
- kiapi-0.8.0/src/kiapi/api/ui/static/_ui/index-B_x7wpZf.js +26 -0
- kiapi-0.8.0/src/kiapi/api/ui/static/_ui/index-CR-VuPGf.css +1 -0
- kiapi-0.8.0/src/kiapi/api/ui/static/_ui/instrument-serif-latin-400-normal-BVbkICAY.woff +0 -0
- kiapi-0.8.0/src/kiapi/api/ui/static/_ui/instrument-serif-latin-400-normal-DnYpCC2O.woff2 +0 -0
- kiapi-0.8.0/src/kiapi/api/ui/static/_ui/instrument-serif-latin-ext-400-normal-C2je3j2s.woff2 +0 -0
- kiapi-0.8.0/src/kiapi/api/ui/static/_ui/instrument-serif-latin-ext-400-normal-CFCUzsTy.woff +0 -0
- kiapi-0.8.0/src/kiapi/api/ui/static/index.html +15 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/chat/README.md +184 -11
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/chat/__init__.py +7 -3
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/chat/_constants/description.py +24 -16
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/chat/_helpers/register.py +20 -17
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/chat/_models/qwen3_5.py +71 -26
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/chat/_models/qwen3_omni.py +72 -23
- kiapi-0.8.0/src/kiapi/capabilities/chat/_models/qwen4_exp.py +55 -0
- kiapi-0.8.0/src/kiapi/capabilities/chat/_operations/cancel_on_request.py +46 -0
- kiapi-0.8.0/src/kiapi/capabilities/chat/_operations/collect_generation.py +23 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/chat/_operations/emit_streaming_response.py +5 -1
- kiapi-0.8.0/src/kiapi/capabilities/chat/_operations/ensure_omni_apc_embeddings.py +44 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/chat/_operations/ensure_omni_deepstack_window.py +7 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/chat/_operations/format_response.py +10 -3
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/chat/_operations/handle_chat.py +13 -2
- kiapi-0.8.0/src/kiapi/capabilities/chat/_operations/initialize_apc.py +17 -0
- kiapi-0.8.0/src/kiapi/capabilities/chat/_operations/limit_to_context.py +30 -0
- kiapi-0.8.0/src/kiapi/capabilities/chat/_operations/log_apc_result.py +22 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/chat/_operations/parse_hermes_tool_calls.py +2 -2
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/chat/_operations/parse_json_tool_calls.py +1 -1
- kiapi-0.8.0/src/kiapi/capabilities/chat/_operations/prepare_external_ple_view.py +93 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/chat/_operations/resolve_chat_params.py +9 -7
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/chat/_operations/strip_tool_calls.py +1 -1
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/chat/_settings.py +42 -7
- kiapi-0.8.0/src/kiapi/capabilities/chat/_utils/load_mlx_vlm.py +19 -0
- kiapi-0.8.0/src/kiapi/capabilities/chat/_utils/media_apc_tenant.py +31 -0
- kiapi-0.8.0/src/kiapi/capabilities/chat/_utils/raise_open_file_limit.py +22 -0
- kiapi-0.8.0/src/kiapi/capabilities/chat/_utils/read_context_window.py +39 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/chat/_views/chat_params.py +3 -3
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/chat/_views/chat_request.py +26 -8
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/depthpro/README.md +2 -2
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/depthpro/_constants/description.py +1 -1
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/ernie/README.md +2 -2
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/ernie/_constants/description.py +1 -1
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/flux2/README.md +2 -2
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/flux2/_constants/description.py +1 -1
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/ideogram4/README.md +2 -2
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/ideogram4/_constants/description.py +1 -1
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/qwen/README.md +98 -24
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/qwen/__init__.py +4 -3
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/qwen/_constants/description.py +23 -5
- kiapi-0.8.0/src/kiapi/capabilities/qwen/_constants/image_21.py +6 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/qwen/_helpers/register.py +32 -1
- kiapi-0.8.0/src/kiapi/capabilities/qwen/_helpers/validate_edit.py +19 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/qwen/_helpers/validate_generate.py +7 -2
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/qwen/_models/qwen.py +3 -33
- kiapi-0.8.0/src/kiapi/capabilities/qwen/_models/qwen21.py +182 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/qwen/_operations/handle_edit.py +10 -4
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/qwen/_operations/handle_generate.py +6 -2
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/qwen/_operations/is_quantize_override.py +8 -2
- kiapi-0.8.0/src/kiapi/capabilities/qwen/_operations/resolve_edit_params.py +71 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/qwen/_operations/resolve_generate_params.py +12 -7
- kiapi-0.8.0/src/kiapi/capabilities/qwen/_operations/store_image.py +43 -0
- kiapi-0.8.0/src/kiapi/capabilities/qwen/_operations/validate_common.py +86 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/qwen/_settings.py +55 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/qwen/_views/edit_params.py +3 -1
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/qwen/_views/edit_request.py +30 -14
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/qwen/_views/generate_request.py +25 -11
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/seedvr2/README.md +2 -2
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/seedvr2/_constants/description.py +1 -1
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/zimage/README.md +2 -2
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/zimage/_constants/description.py +1 -1
- kiapi-0.8.0/src/kiapi/cli/check/_helpers/check_image_qwen_image_2_1.py +27 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/job/__init__.py +3 -0
- kiapi-0.8.0/src/kiapi/core/job/_exceptions/job_canceled_error.py +2 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/job/_models/job.py +11 -1
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/memory/_schemas/memory_stats.py +1 -1
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/memory/_services/memory_manager.py +13 -4
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/worker/_services/worker.py +15 -1
- kiapi-0.7.0/src/kiapi/capabilities/chat/_utils/load_mlx_vlm.py +0 -12
- kiapi-0.7.0/src/kiapi/capabilities/qwen/_helpers/validate_edit.py +0 -12
- kiapi-0.7.0/src/kiapi/capabilities/qwen/_operations/resolve_edit_params.py +0 -35
- kiapi-0.7.0/src/kiapi/capabilities/qwen/_operations/validate_common.py +0 -32
- {kiapi-0.7.0 → kiapi-0.8.0}/LICENSE +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/__init__.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/__main__.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/api/__init__.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/api/_constants/require_auth.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/api/_helpers/build_job_responses.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/api/_helpers/build_openapi.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/api/_helpers/build_train_responses.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/api/_helpers/get_accept.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/api/_helpers/get_ctx.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/api/_helpers/get_worker.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/api/_helpers/register_capability_endpoints.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/api/_helpers/submit_and_maybe_wait.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/api/_settings.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/api/_views/async_job_response.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/api/_views/capability_model_spec.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/api/audio/acestep/_views/extract_response.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/api/audio/acestep/_views/track_response.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/api/audio/acestep/router.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/api/audio/audiogen/_views/audio_response.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/api/audio/audiogen/router.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/api/embedding/_views/embedding_response.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/api/embedding/router.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/api/files/_operations/get_file.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/api/files/_operations/get_file_id.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/api/files/_views/file_delete_response.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/api/files/_views/file_list_response.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/api/files/router.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/api/health/_views/health_response.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/api/health/router.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/api/image/depthpro/_views/estimate_response.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/api/image/depthpro/router.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/api/image/ernie/_views/image_response.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/api/image/ernie/router.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/api/image/flux2/_views/image_response.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/api/image/flux2/router.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/api/image/ideogram4/_views/image_response.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/api/image/ideogram4/router.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/api/image/qwen/_views/image_response.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/api/image/seedvr2/_views/image_response.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/api/image/seedvr2/router.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/api/image/zimage/_views/image_response.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/api/image/zimage/router.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/api/jobs/_operations/get_job_id.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/api/jobs/_views/job_delete_response.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/api/jobs/_views/job_list_response.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/api/jobs/router.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/api/models/_views/model_list_response.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/api/video/ltx2/_views/__init__.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/api/video/ltx2/_views/video_response.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/api/video/ltx2/router.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/api/web/_views/__init__.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/api/web/_views/fetch_api_request.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/api/web/_views/fetch_error_response.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/api/web/router.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/__init__.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/_exceptions/CapabilityError.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/_exceptions/ValidationError.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/_helpers/attach_mflux_progress.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/_helpers/get_file_path.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/_helpers/resolve_file_ref.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/acestep/README.md +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/acestep/__init__.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/acestep/_constants/description.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/acestep/_exceptions/ace_step_engine_error.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/acestep/_helpers/register.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/acestep/_models/acestep.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/acestep/_operations/handle_cover.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/acestep/_operations/handle_extract.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/acestep/_operations/handle_generate.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/acestep/_operations/handle_repaint.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/acestep/_operations/resolve_ace_step_paths.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/acestep/_operations/resolve_cover_params.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/acestep/_operations/resolve_engine.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/acestep/_operations/resolve_extract_params.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/acestep/_operations/resolve_generate_params.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/acestep/_operations/resolve_repaint_params.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/acestep/_schemas/ace_step_paths.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/acestep/_services/ace_step_engine.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/acestep/_settings.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/acestep/_views/ace_step_base.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/acestep/_views/cover_params.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/acestep/_views/cover_request.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/acestep/_views/extract_params.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/acestep/_views/extract_request.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/acestep/_views/generate_params.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/acestep/_views/generate_request.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/acestep/_views/repaint_params.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/acestep/_views/repaint_request.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/acestep/_views/track_params.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/acestep/worker_subprocess.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/audiogen/README.md +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/audiogen/__init__.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/audiogen/_constants/description.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/audiogen/_helpers/attach_audiogen_progress.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/audiogen/_helpers/register.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/audiogen/_helpers/validate_generate.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/audiogen/_models/audiogen.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/audiogen/_operations/handle_generate.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/audiogen/_operations/resolve_generate_params.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/audiogen/_settings.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/audiogen/_views/generate_params.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/audiogen/_views/generate_request.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/chat/_operations/apply_template.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/chat/_operations/completed_hermes_tool_call_text.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/chat/_operations/ensure_omni_image_video_join.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/chat/_operations/parse_messages.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/chat/_operations/stream_text_from_tokens.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/chat/_utils/apply_parallel_tool_call_policy.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/chat/_utils/apply_seed.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/chat/_utils/load_audio_mono.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/chat/_utils/warmup_params.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/depthpro/__init__.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/depthpro/_helpers/register.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/depthpro/_helpers/validate_estimate.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/depthpro/_models/depthpro.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/depthpro/_operations/handle_estimate.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/depthpro/_operations/is_quantize_override.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/depthpro/_operations/resolve_estimate_params.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/depthpro/_settings.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/depthpro/_views/estimate_params.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/depthpro/_views/estimate_request.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/embedding/README.md +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/embedding/__init__.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/embedding/_constants/description.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/embedding/_helpers/register.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/embedding/_models/qwen3_text.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/embedding/_models/qwen3_vl.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/embedding/_operations/format_response.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/embedding/_operations/handle_embed.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/embedding/_operations/parse_inputs.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/embedding/_operations/resolve_embed_params.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/embedding/_settings.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/embedding/_utils/to_vector.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/embedding/_views/embed_params.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/embedding/_views/embed_request.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/ernie/__init__.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/ernie/_helpers/register.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/ernie/_helpers/validate_edit.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/ernie/_helpers/validate_generate.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/ernie/_models/ernie.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/ernie/_operations/handle_edit.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/ernie/_operations/handle_generate.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/ernie/_operations/handle_train.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/ernie/_operations/is_quantize_override.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/ernie/_operations/resolve_edit_params.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/ernie/_operations/resolve_generate_params.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/ernie/_operations/resolve_lora_params.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/ernie/_operations/resolve_train_params.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/ernie/_operations/validate_common.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/ernie/_schemas/lora_ref.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/ernie/_settings.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/ernie/_views/edit_params.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/ernie/_views/edit_request.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/ernie/_views/generate_params.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/ernie/_views/generate_request.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/ernie/_views/train_params.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/ernie/_views/train_request.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/flux2/__init__.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/flux2/_helpers/register.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/flux2/_helpers/validate_edit.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/flux2/_helpers/validate_generate.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/flux2/_models/flux2.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/flux2/_operations/handle_edit.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/flux2/_operations/handle_generate.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/flux2/_operations/handle_train.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/flux2/_operations/is_quantize_override.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/flux2/_operations/resolve_edit_params.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/flux2/_operations/resolve_generate_params.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/flux2/_operations/resolve_lora_params.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/flux2/_operations/resolve_train_params.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/flux2/_operations/role_spec.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/flux2/_operations/split_repo.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/flux2/_operations/validate_common.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/flux2/_schemas/lora_ref.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/flux2/_settings.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/flux2/_views/edit_params.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/flux2/_views/edit_request.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/flux2/_views/generate_params.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/flux2/_views/generate_request.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/flux2/_views/train_params.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/flux2/_views/train_request.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/ideogram4/__init__.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/ideogram4/_helpers/register.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/ideogram4/_helpers/validate_generate.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/ideogram4/_models/ideogram4.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/ideogram4/_operations/handle_generate.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/ideogram4/_operations/is_quantize_override.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/ideogram4/_operations/resolve_generate_params.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/ideogram4/_settings.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/ideogram4/_views/generate_params.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/ideogram4/_views/generate_request.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/ltx2/README.md +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/ltx2/__init__.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/ltx2/_constants/description.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/ltx2/_constants/variants.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/ltx2/_helpers/register.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/ltx2/_helpers/validate_generate.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/ltx2/_models/ltx2.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/ltx2/_models/ltx25.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/ltx2/_operations/detect_mode.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/ltx2/_operations/handle_generate.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/ltx2/_operations/resolve_generate_params.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/ltx2/_settings.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/ltx2/_views/generate_params.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/ltx2/_views/generate_request.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/qwen/_operations/resolve_lora_params.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/qwen/_schemas/lora_ref.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/qwen/_views/generate_params.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/seedvr2/__init__.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/seedvr2/_helpers/register.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/seedvr2/_helpers/validate_upscale.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/seedvr2/_models/seedvr2.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/seedvr2/_operations/handle_upscale.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/seedvr2/_operations/is_quantize_override.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/seedvr2/_operations/resolve_upscale_params.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/seedvr2/_settings.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/seedvr2/_views/upscale_params.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/seedvr2/_views/upscale_request.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/web/README.md +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/web/__init__.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/web/_constants/description.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/web/_exceptions/FetchError.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/web/_exceptions/SearchBackendError.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/web/_helpers/register.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/web/_models/crawl4ai.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/web/_models/searxng.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/web/_operations/handle_fetch.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/web/_operations/handle_search.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/web/_operations/resolve_fetch_params.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/web/_operations/resolve_search_params.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/web/_operations/resolve_searxng_config_dir.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/web/_services/__init__.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/web/_services/web_backend_process.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/web/_settings.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/web/_views/fetch_params.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/web/_views/fetch_request.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/web/_views/fetch_result.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/web/_views/search_params.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/web/_views/search_request.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/web/_views/search_response.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/web/resources/__init__.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/web/resources/searxng/__init__.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/web/resources/searxng/settings.yml +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/zimage/__init__.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/zimage/_helpers/register.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/zimage/_helpers/validate_generate.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/zimage/_models/zimage.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/zimage/_operations/handle_generate.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/zimage/_operations/handle_train.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/zimage/_operations/is_quantize_override.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/zimage/_operations/resolve_generate_params.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/zimage/_operations/resolve_lora_params.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/zimage/_operations/resolve_train_params.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/zimage/_schemas/lora_ref.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/zimage/_settings.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/zimage/_views/generate_params.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/zimage/_views/generate_request.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/zimage/_views/train_params.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/capabilities/zimage/_views/train_request.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/cli/__init__.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/cli/_helpers/dedupe_resources.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/cli/_helpers/register_all_capabilities.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/cli/_helpers/run_resources.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/cli/_helpers/select_specs.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/cli/activate/_operations/preflight_hf_access.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/cli/activate/cli.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/cli/check/_helpers/check_audio_acestep_turbo.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/cli/check/_helpers/check_audio_acestep_xl_base.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/cli/check/_helpers/check_audio_audiogen_medium.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/cli/check/_helpers/check_chat_chat_qwen3_8_27b.py +0 -0
- /kiapi-0.7.0/src/kiapi/cli/check/_helpers/check_chat_chat_qwen3_6_27b.py → /kiapi-0.8.0/src/kiapi/cli/check/_helpers/check_chat_chat_qwen3_8_flash_next.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/cli/check/_helpers/check_chat_chat_qwen3_omni.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/cli/check/_helpers/check_embedding_embedding_qwen3_embedding_8b.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/cli/check/_helpers/check_embedding_embedding_qwen3_vl_embedding_2b.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/cli/check/_helpers/check_image_depthpro_base.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/cli/check/_helpers/check_image_ernie_base.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/cli/check/_helpers/check_image_ernie_turbo.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/cli/check/_helpers/check_image_flux2_klein_9b.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/cli/check/_helpers/check_image_flux2_klein_base_4b.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/cli/check/_helpers/check_image_flux2_klein_base_9b.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/cli/check/_helpers/check_image_ideogram4_fp8.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/cli/check/_helpers/check_image_qwen_edit_2509.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/cli/check/_helpers/check_image_qwen_image.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/cli/check/_helpers/check_image_seedvr2_3b.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/cli/check/_helpers/check_image_seedvr2_7b.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/cli/check/_helpers/check_image_zimage_base.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/cli/check/_helpers/check_image_zimage_turbo.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/cli/check/_helpers/check_video_ltx2_distilled.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/cli/check/_helpers/check_video_ltx2_ltx_2_5_distilled.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/cli/check/_helpers/check_web_web_fetch.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/cli/check/_helpers/check_web_web_search.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/cli/check/_operations/build_check_result.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/cli/check/_operations/check_context.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/cli/check/_operations/create_sample_image.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/cli/check/_schemas/check_result.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/cli/check/cli.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/cli/cli.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/cli/config/cli.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/cli/config/edit/cli.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/cli/config/init/cli.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/cli/config/show/cli.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/cli/config/template/cli.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/cli/deactivate/cli.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/cli/run/asgi.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/cli/run/cli.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/cli/service/__init__.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/cli/service/_services/service_manager.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/cli/service/cli.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/cli/service/install/cli.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/cli/service/show/__init__.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/cli/service/show/cli.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/cli/service/start/cli.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/cli/service/status/cli.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/cli/service/stop/cli.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/cli/service/uninstall/cli.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/cli/status/cli.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/app/__init__.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/app/_schemas/app_context.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/capability/__init__.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/capability/_schemas/capability_spec.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/capability/_services/capability_spec_registry.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/config/__init__.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/config/_exceptions/user_config_error.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/config/_helpers/get_user_settings_path.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/config/_helpers/load_user_settings.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/file/__init__.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/file/_helpers/create_file_store.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/file/_helpers/resolve_file_ref.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/file/_schemas/file_data_url_ref.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/file/_schemas/file_id_ref.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/file/_schemas/file_record.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/file/_schemas/file_url_ref.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/file/_services/file_store.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/file/_settings.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/file/_types/file_id.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/file/_types/file_ref.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/file/_views/resolved_file_ref.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/job/_enums/job_status.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/job/_helpers/creep_progress.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/job/_services/job_store.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/job/_services/progress_reporter.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/job/_types/job_id.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/job/_types/job_result.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/job/_types/job_type.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/logging/__init__.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/logging/_helpers/get_log_level.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/logging/_helpers/setup_logger.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/logging/_settings.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/logging/_types/log_level.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/memory/__init__.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/memory/_exceptions/memory_budget_error.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/memory/_helpers/create_memory_manager.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/memory/_operations/log_memory_limit.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/memory/_operations/resolve_effective_memory_limit_gb.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/memory/_operations/resolve_framework_strategy.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/memory/_schemas/framework_strategy.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/memory/_schemas/resident_model.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/memory/_schemas/resident_model_stats.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/memory/_settings.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/memory/_types/framework_name.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/memory/_types/resident_key.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/model/__init__.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/model/_exceptions/unknown_model_error.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/model/_schemas/model_spec.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/model/_services/model_registry.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/model/_types/model_alias.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/model/_types/model_domain.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/model/_types/model_family.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/model/_types/model_key.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/model/_types/model_name.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/model/_types/model_repo.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/net/__init__.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/net/_exceptions/unsafe_url_error.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/net/_helpers/verify_public_url.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/net/_settings.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/setup/__init__.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/setup/_exceptions/setup_required_error.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/setup/_schemas/docker_image_resource.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/setup/_schemas/hf_snapshot_resource.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/setup/_schemas/local_path_resource.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/setup/_schemas/python_package_resource.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/setup/_schemas/python_venv_resource.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/setup/_schemas/setup_status.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/setup/_schemas/url_file_resource.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/setup/_services/setup_manager.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/setup/_types/setup_resource.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/setup/_types/setup_target.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/workdir/__init__.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/workdir/_helpers/create_work_dir.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/workdir/_settings.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/worker/__init__.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/worker/_helpers/create_worker.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/worker/_settings.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/core/worker/_types/job_thunk.py +0 -0
- {kiapi-0.7.0 → kiapi-0.8.0}/src/kiapi/py.typed +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: kiapi
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.8.0
|
|
4
4
|
Summary: Unified local inference API server for LLM agents on Apple Silicon (MLX): chat, embedding, image, music, sound-effect, and video — one process, one global memory budget, one single-flight queue, unified jobs and files.
|
|
5
5
|
Project-URL: Homepage, https://github.com/kiarina/kiapi
|
|
6
6
|
Project-URL: Repository, https://github.com/kiarina/kiapi
|
|
@@ -27,7 +27,7 @@ Requires-Dist: fastapi>=0.141
|
|
|
27
27
|
Requires-Dist: httpx
|
|
28
28
|
Requires-Dist: kiarina-utils-app>=2.3.0
|
|
29
29
|
Requires-Dist: kiarina-utils-common>=2.2.0
|
|
30
|
-
Requires-Dist: mflux>=0.
|
|
30
|
+
Requires-Dist: mflux>=0.20.0
|
|
31
31
|
Requires-Dist: mlx-audiocraft>=0.1.0
|
|
32
32
|
Requires-Dist: mlx-embeddings>=0.1.0
|
|
33
33
|
Requires-Dist: mlx-lm>=0.31.3
|
|
@@ -53,6 +53,11 @@ Description-Content-Type: text/markdown
|
|
|
53
53
|

|
|
54
54
|
[](https://kiarina.github.io/kiapi/)
|
|
55
55
|
|
|
56
|
+
<picture>
|
|
57
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/kiarina/kiapi/main/docs/images/web-ui/playground-dark.webp">
|
|
58
|
+
<img alt="The kiapi web UI running Z-Image, with the generated image next to the form" src="https://raw.githubusercontent.com/kiarina/kiapi/main/docs/images/web-ui/playground-light.webp">
|
|
59
|
+
</picture>
|
|
60
|
+
|
|
56
61
|
## Summary
|
|
57
62
|
|
|
58
63
|
kiapi is an API server that uses a Mac Studio M4 Max with 128GB of memory at home to provide the following capabilities.
|
|
@@ -72,6 +77,37 @@ See: [API Documents](https://kiarina.github.io/kiapi/)
|
|
|
72
77
|
> The Mac Studio M4 Max with 128GB of memory is an example.
|
|
73
78
|
> Other Apple Silicon models will also work if they have sufficient unified memory.
|
|
74
79
|
|
|
80
|
+
## Web UI
|
|
81
|
+
|
|
82
|
+
Open `http://localhost:8000/` while kiapi runs. The web UI lets you try every
|
|
83
|
+
family without writing a request, and shows what each one can do.
|
|
84
|
+
|
|
85
|
+
- **Playground** for every family: forms built from the API schema, uploads or
|
|
86
|
+
stored files as inputs, and results as they finish.
|
|
87
|
+
- **Write with chat** drafts prompts with a local chat model that reads the
|
|
88
|
+
family's guide.
|
|
89
|
+
- **Ask about a family** from the corner button. The assistant answers from
|
|
90
|
+
the family's OpenAPI document and can fill in the form for you; you review
|
|
91
|
+
and submit it.
|
|
92
|
+
- **Models** shows which models are ready and the `kiapi activate` command for
|
|
93
|
+
anything missing. **Jobs** and **Files** show progress and previews.
|
|
94
|
+
|
|
95
|
+
<p>
|
|
96
|
+
<picture>
|
|
97
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/kiarina/kiapi/main/docs/images/web-ui/overview-dark.webp">
|
|
98
|
+
<img alt="Overview of server status, jobs, and recent files" src="https://raw.githubusercontent.com/kiarina/kiapi/main/docs/images/web-ui/overview-light.webp" width="49%">
|
|
99
|
+
</picture>
|
|
100
|
+
<picture>
|
|
101
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/kiarina/kiapi/main/docs/images/web-ui/models-dark.webp">
|
|
102
|
+
<img alt="Model setup status with activate commands" src="https://raw.githubusercontent.com/kiarina/kiapi/main/docs/images/web-ui/models-light.webp" width="49%">
|
|
103
|
+
</picture>
|
|
104
|
+
</p>
|
|
105
|
+
|
|
106
|
+
<picture>
|
|
107
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/kiarina/kiapi/main/docs/images/web-ui/assistant-dark.webp">
|
|
108
|
+
<img alt="The assistant filling in the Z-Image form from a request" src="https://raw.githubusercontent.com/kiarina/kiapi/main/docs/images/web-ui/assistant-light.webp">
|
|
109
|
+
</picture>
|
|
110
|
+
|
|
75
111
|
## Resources
|
|
76
112
|
|
|
77
113
|
To provide its capabilities, kiapi downloads and uses selected resources from the list below.
|
|
@@ -83,8 +119,8 @@ Always review the upstream license to confirm the terms and whether commercial u
|
|
|
83
119
|
| Domain | Family | Resource | Kind | Upstream license | Notes |
|
|
84
120
|
|---|---|---|---|---|---|
|
|
85
121
|
| chat | [chat](src/kiapi/capabilities/chat/README.md) | [mlx-community/Qwen3-Omni-30B-A3B-Instruct-4bit](https://huggingface.co/mlx-community/Qwen3-Omni-30B-A3B-Instruct-4bit) | model weights | Apache-2.0 | MLX-converted Qwen3 Omni model. |
|
|
122
|
+
| | | [mlx-community/Qwen3.8-Flash-Next-4bit](https://huggingface.co/mlx-community/Qwen3.8-Flash-Next-4bit) | model weights | Qwen Community License 1.0 | MLX-converted Qwen3.8-Flash-Next. Commercial Model-as-a-Service or AI-work-assistant businesses need a separate license from Qwen. |
|
|
86
123
|
| | | [mlx-community/Qwen3.8-27B-4bit](https://huggingface.co/mlx-community/Qwen3.8-27B-4bit) | model weights | Apache-2.0 | MLX-converted Qwen3.8 model. |
|
|
87
|
-
| | | [mlx-community/Qwen3.6-27B-4bit](https://huggingface.co/mlx-community/Qwen3.6-27B-4bit) | model weights | Apache-2.0 | MLX-converted Qwen3.6 model. |
|
|
88
124
|
| embedding | [embedding](src/kiapi/capabilities/embedding/README.md) | [mlx-community/Qwen3-Embedding-8B-mxfp8](https://huggingface.co/mlx-community/Qwen3-Embedding-8B-mxfp8) | model weights | Apache-2.0 | Text embedding model. |
|
|
89
125
|
| | | [mlx-community/Qwen3-VL-Embedding-2B-mxfp8](https://huggingface.co/mlx-community/Qwen3-VL-Embedding-2B-mxfp8) | model weights | Apache-2.0 | Text + image embedding model. |
|
|
90
126
|
| image | [zimage](src/kiapi/capabilities/zimage/README.md) | [filipstrand/Z-Image-Turbo-mflux-4bit](https://huggingface.co/filipstrand/Z-Image-Turbo-mflux-4bit) | model weights | Tongyi Qianwen License | Quantized MLX-compatible Z-Image Turbo; inherits the original Z-Image Turbo license. |
|
|
@@ -94,6 +130,7 @@ Always review the upstream license to confirm the terms and whether commercial u
|
|
|
94
130
|
| | | [black-forest-labs/FLUX.2-klein-base-9B](https://huggingface.co/black-forest-labs/FLUX.2-klein-base-9B) | model weights | FLUX Non-Commercial License | Gated upstream model. Confirm terms before any commercial use. |
|
|
95
131
|
| | [qwen](src/kiapi/capabilities/qwen/README.md) | [Qwen/Qwen-Image](https://huggingface.co/Qwen/Qwen-Image) | model weights | Apache-2.0 | Text-to-image model. |
|
|
96
132
|
| | | [Qwen/Qwen-Image-Edit-2509](https://huggingface.co/Qwen/Qwen-Image-Edit-2509) | model weights | Apache-2.0 | Image editing model. |
|
|
133
|
+
| | | [Qwen/Qwen-Image-2.1](https://huggingface.co/Qwen/Qwen-Image-2.1) | model weights | Qwen Research License | Non-commercial (research and evaluation) only; commercial use needs a separate license from Alibaba. Unified generation and editing, RGBA output. Editing is pinned from the [kiarina fork](https://github.com/kiarina/mflux/tree/qwen-image-2.1-edit) of mflux until [#741](https://github.com/mflux-community/mflux/pull/741) is released. |
|
|
97
134
|
| | [ideogram4](src/kiapi/capabilities/ideogram4/README.md) | [ideogram-ai/ideogram-4-fp8](https://huggingface.co/ideogram-ai/ideogram-4-fp8) | model weights | Ideogram Non-Commercial Model Agreement | Gated upstream model. Confirm hosted-service and commercial-use terms. |
|
|
98
135
|
| | [ernie](src/kiapi/capabilities/ernie/README.md) | [baidu/ERNIE-Image-Turbo](https://huggingface.co/baidu/ERNIE-Image-Turbo) | model weights | Apache-2.0 | Turbo ERNIE-Image variant. |
|
|
99
136
|
| | | [baidu/ERNIE-Image](https://huggingface.co/baidu/ERNIE-Image) | model weights | Apache-2.0 | Base ERNIE-Image variant. |
|
|
@@ -165,6 +202,8 @@ Always review the upstream license to confirm the terms and whether commercial u
|
|
|
165
202
|
| | openapi | `GET /openapi.json` | Return the common API and each capability documentation URL. |
|
|
166
203
|
| | | `GET /v1/{domain}/{family}/openapi.json` | Return detailed input/output specs, usage, tips, and examples for each family. |
|
|
167
204
|
| | health | `GET /health` | Return server status, warmup status, queue length, and memory usage. |
|
|
205
|
+
| | setup | `GET /v1/setup` | Return every model with its setup state and the command that activates a missing resource. |
|
|
206
|
+
| | web UI | `GET /` | Serve the web UI. |
|
|
168
207
|
|
|
169
208
|
See: [kiapi API Docs](https://kiarina.github.io/kiapi/)
|
|
170
209
|
|
|
@@ -232,6 +271,9 @@ with the theme 'a person walking in the rain'.
|
|
|
232
271
|
open ~/Downloads/bgm.wav
|
|
233
272
|
```
|
|
234
273
|
|
|
274
|
+
**Use from a browser:**
|
|
275
|
+
Open `http://localhost:8000/` while kiapi runs. See [Web UI](#web-ui).
|
|
276
|
+
|
|
235
277
|
**Run as a background service:**
|
|
236
278
|
```sh
|
|
237
279
|
# kiapi
|
|
@@ -284,6 +326,7 @@ make upgrade # Upgrade dependencies
|
|
|
284
326
|
make # Format, type-check, and regenerate dynamic documentation
|
|
285
327
|
make test # Unit tests
|
|
286
328
|
make dev # Start the development server with auto-reload
|
|
329
|
+
make web-dev # Start the web UI dev server against `make dev` (needs Node and pnpm via mise)
|
|
287
330
|
|
|
288
331
|
# GPU-backed functional and regression tests
|
|
289
332
|
make verify # Choose the capability family interactively
|
|
@@ -4,6 +4,11 @@
|
|
|
4
4
|

|
|
5
5
|
[](https://kiarina.github.io/kiapi/)
|
|
6
6
|
|
|
7
|
+
<picture>
|
|
8
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/kiarina/kiapi/main/docs/images/web-ui/playground-dark.webp">
|
|
9
|
+
<img alt="The kiapi web UI running Z-Image, with the generated image next to the form" src="https://raw.githubusercontent.com/kiarina/kiapi/main/docs/images/web-ui/playground-light.webp">
|
|
10
|
+
</picture>
|
|
11
|
+
|
|
7
12
|
## Summary
|
|
8
13
|
|
|
9
14
|
kiapi is an API server that uses a Mac Studio M4 Max with 128GB of memory at home to provide the following capabilities.
|
|
@@ -23,6 +28,37 @@ See: [API Documents](https://kiarina.github.io/kiapi/)
|
|
|
23
28
|
> The Mac Studio M4 Max with 128GB of memory is an example.
|
|
24
29
|
> Other Apple Silicon models will also work if they have sufficient unified memory.
|
|
25
30
|
|
|
31
|
+
## Web UI
|
|
32
|
+
|
|
33
|
+
Open `http://localhost:8000/` while kiapi runs. The web UI lets you try every
|
|
34
|
+
family without writing a request, and shows what each one can do.
|
|
35
|
+
|
|
36
|
+
- **Playground** for every family: forms built from the API schema, uploads or
|
|
37
|
+
stored files as inputs, and results as they finish.
|
|
38
|
+
- **Write with chat** drafts prompts with a local chat model that reads the
|
|
39
|
+
family's guide.
|
|
40
|
+
- **Ask about a family** from the corner button. The assistant answers from
|
|
41
|
+
the family's OpenAPI document and can fill in the form for you; you review
|
|
42
|
+
and submit it.
|
|
43
|
+
- **Models** shows which models are ready and the `kiapi activate` command for
|
|
44
|
+
anything missing. **Jobs** and **Files** show progress and previews.
|
|
45
|
+
|
|
46
|
+
<p>
|
|
47
|
+
<picture>
|
|
48
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/kiarina/kiapi/main/docs/images/web-ui/overview-dark.webp">
|
|
49
|
+
<img alt="Overview of server status, jobs, and recent files" src="https://raw.githubusercontent.com/kiarina/kiapi/main/docs/images/web-ui/overview-light.webp" width="49%">
|
|
50
|
+
</picture>
|
|
51
|
+
<picture>
|
|
52
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/kiarina/kiapi/main/docs/images/web-ui/models-dark.webp">
|
|
53
|
+
<img alt="Model setup status with activate commands" src="https://raw.githubusercontent.com/kiarina/kiapi/main/docs/images/web-ui/models-light.webp" width="49%">
|
|
54
|
+
</picture>
|
|
55
|
+
</p>
|
|
56
|
+
|
|
57
|
+
<picture>
|
|
58
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/kiarina/kiapi/main/docs/images/web-ui/assistant-dark.webp">
|
|
59
|
+
<img alt="The assistant filling in the Z-Image form from a request" src="https://raw.githubusercontent.com/kiarina/kiapi/main/docs/images/web-ui/assistant-light.webp">
|
|
60
|
+
</picture>
|
|
61
|
+
|
|
26
62
|
## Resources
|
|
27
63
|
|
|
28
64
|
To provide its capabilities, kiapi downloads and uses selected resources from the list below.
|
|
@@ -34,8 +70,8 @@ Always review the upstream license to confirm the terms and whether commercial u
|
|
|
34
70
|
| Domain | Family | Resource | Kind | Upstream license | Notes |
|
|
35
71
|
|---|---|---|---|---|---|
|
|
36
72
|
| chat | [chat](src/kiapi/capabilities/chat/README.md) | [mlx-community/Qwen3-Omni-30B-A3B-Instruct-4bit](https://huggingface.co/mlx-community/Qwen3-Omni-30B-A3B-Instruct-4bit) | model weights | Apache-2.0 | MLX-converted Qwen3 Omni model. |
|
|
73
|
+
| | | [mlx-community/Qwen3.8-Flash-Next-4bit](https://huggingface.co/mlx-community/Qwen3.8-Flash-Next-4bit) | model weights | Qwen Community License 1.0 | MLX-converted Qwen3.8-Flash-Next. Commercial Model-as-a-Service or AI-work-assistant businesses need a separate license from Qwen. |
|
|
37
74
|
| | | [mlx-community/Qwen3.8-27B-4bit](https://huggingface.co/mlx-community/Qwen3.8-27B-4bit) | model weights | Apache-2.0 | MLX-converted Qwen3.8 model. |
|
|
38
|
-
| | | [mlx-community/Qwen3.6-27B-4bit](https://huggingface.co/mlx-community/Qwen3.6-27B-4bit) | model weights | Apache-2.0 | MLX-converted Qwen3.6 model. |
|
|
39
75
|
| embedding | [embedding](src/kiapi/capabilities/embedding/README.md) | [mlx-community/Qwen3-Embedding-8B-mxfp8](https://huggingface.co/mlx-community/Qwen3-Embedding-8B-mxfp8) | model weights | Apache-2.0 | Text embedding model. |
|
|
40
76
|
| | | [mlx-community/Qwen3-VL-Embedding-2B-mxfp8](https://huggingface.co/mlx-community/Qwen3-VL-Embedding-2B-mxfp8) | model weights | Apache-2.0 | Text + image embedding model. |
|
|
41
77
|
| image | [zimage](src/kiapi/capabilities/zimage/README.md) | [filipstrand/Z-Image-Turbo-mflux-4bit](https://huggingface.co/filipstrand/Z-Image-Turbo-mflux-4bit) | model weights | Tongyi Qianwen License | Quantized MLX-compatible Z-Image Turbo; inherits the original Z-Image Turbo license. |
|
|
@@ -45,6 +81,7 @@ Always review the upstream license to confirm the terms and whether commercial u
|
|
|
45
81
|
| | | [black-forest-labs/FLUX.2-klein-base-9B](https://huggingface.co/black-forest-labs/FLUX.2-klein-base-9B) | model weights | FLUX Non-Commercial License | Gated upstream model. Confirm terms before any commercial use. |
|
|
46
82
|
| | [qwen](src/kiapi/capabilities/qwen/README.md) | [Qwen/Qwen-Image](https://huggingface.co/Qwen/Qwen-Image) | model weights | Apache-2.0 | Text-to-image model. |
|
|
47
83
|
| | | [Qwen/Qwen-Image-Edit-2509](https://huggingface.co/Qwen/Qwen-Image-Edit-2509) | model weights | Apache-2.0 | Image editing model. |
|
|
84
|
+
| | | [Qwen/Qwen-Image-2.1](https://huggingface.co/Qwen/Qwen-Image-2.1) | model weights | Qwen Research License | Non-commercial (research and evaluation) only; commercial use needs a separate license from Alibaba. Unified generation and editing, RGBA output. Editing is pinned from the [kiarina fork](https://github.com/kiarina/mflux/tree/qwen-image-2.1-edit) of mflux until [#741](https://github.com/mflux-community/mflux/pull/741) is released. |
|
|
48
85
|
| | [ideogram4](src/kiapi/capabilities/ideogram4/README.md) | [ideogram-ai/ideogram-4-fp8](https://huggingface.co/ideogram-ai/ideogram-4-fp8) | model weights | Ideogram Non-Commercial Model Agreement | Gated upstream model. Confirm hosted-service and commercial-use terms. |
|
|
49
86
|
| | [ernie](src/kiapi/capabilities/ernie/README.md) | [baidu/ERNIE-Image-Turbo](https://huggingface.co/baidu/ERNIE-Image-Turbo) | model weights | Apache-2.0 | Turbo ERNIE-Image variant. |
|
|
50
87
|
| | | [baidu/ERNIE-Image](https://huggingface.co/baidu/ERNIE-Image) | model weights | Apache-2.0 | Base ERNIE-Image variant. |
|
|
@@ -116,6 +153,8 @@ Always review the upstream license to confirm the terms and whether commercial u
|
|
|
116
153
|
| | openapi | `GET /openapi.json` | Return the common API and each capability documentation URL. |
|
|
117
154
|
| | | `GET /v1/{domain}/{family}/openapi.json` | Return detailed input/output specs, usage, tips, and examples for each family. |
|
|
118
155
|
| | health | `GET /health` | Return server status, warmup status, queue length, and memory usage. |
|
|
156
|
+
| | setup | `GET /v1/setup` | Return every model with its setup state and the command that activates a missing resource. |
|
|
157
|
+
| | web UI | `GET /` | Serve the web UI. |
|
|
119
158
|
|
|
120
159
|
See: [kiapi API Docs](https://kiarina.github.io/kiapi/)
|
|
121
160
|
|
|
@@ -183,6 +222,9 @@ with the theme 'a person walking in the rain'.
|
|
|
183
222
|
open ~/Downloads/bgm.wav
|
|
184
223
|
```
|
|
185
224
|
|
|
225
|
+
**Use from a browser:**
|
|
226
|
+
Open `http://localhost:8000/` while kiapi runs. See [Web UI](#web-ui).
|
|
227
|
+
|
|
186
228
|
**Run as a background service:**
|
|
187
229
|
```sh
|
|
188
230
|
# kiapi
|
|
@@ -235,6 +277,7 @@ make upgrade # Upgrade dependencies
|
|
|
235
277
|
make # Format, type-check, and regenerate dynamic documentation
|
|
236
278
|
make test # Unit tests
|
|
237
279
|
make dev # Start the development server with auto-reload
|
|
280
|
+
make web-dev # Start the web UI dev server against `make dev` (needs Node and pnpm via mise)
|
|
238
281
|
|
|
239
282
|
# GPU-backed functional and regression tests
|
|
240
283
|
make verify # Choose the capability family interactively
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "kiapi"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.8.0"
|
|
4
4
|
description = "Unified local inference API server for LLM agents on Apple Silicon (MLX): chat, embedding, image, music, sound-effect, and video — one process, one global memory budget, one single-flight queue, unified jobs and files."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.12,<3.13"
|
|
@@ -60,7 +60,7 @@ dependencies = [
|
|
|
60
60
|
# as a PythonPackageResource to keep PyPI metadata free of direct URLs.
|
|
61
61
|
# --- chat capability (mlx-vlm) ---
|
|
62
62
|
# mlx-vlm supports BOTH model_types we use in one install:
|
|
63
|
-
# qwen3_omni_moe (Qwen3-Omni)
|
|
63
|
+
# qwen3_omni_moe (Qwen3-Omni), qwen3_5 (Qwen3.8-27B) and qwen4_exp (Qwen3.8-Flash-Next).
|
|
64
64
|
# Pinned exactly because the chat capability patches its internals;
|
|
65
65
|
# remaining workarounds tracked in src/kiapi/capabilities/chat/README.md.
|
|
66
66
|
"mlx-vlm==0.7.1",
|
|
@@ -69,7 +69,7 @@ dependencies = [
|
|
|
69
69
|
"torch",
|
|
70
70
|
"torchvision",
|
|
71
71
|
"torchaudio",
|
|
72
|
-
"mflux>=0.
|
|
72
|
+
"mflux>=0.20.0",
|
|
73
73
|
"pydantic-settings-manager>=3.8.0",
|
|
74
74
|
]
|
|
75
75
|
|
|
@@ -88,10 +88,16 @@ build-backend = "hatchling.build"
|
|
|
88
88
|
|
|
89
89
|
[tool.hatch.build.targets.wheel]
|
|
90
90
|
packages = ["src/kiapi"]
|
|
91
|
-
artifacts = [
|
|
91
|
+
artifacts = [
|
|
92
|
+
"src/kiapi/capabilities/web/resources/searxng/settings.yml",
|
|
93
|
+
# Built by `mise run web:build`; gitignored, so listed explicitly.
|
|
94
|
+
"src/kiapi/api/ui/static/**",
|
|
95
|
+
]
|
|
92
96
|
|
|
93
97
|
[tool.hatch.build.targets.sdist]
|
|
94
98
|
only-include = ["src"]
|
|
99
|
+
# `uv build` makes the wheel from the sdist, so the built UI must ride along here too.
|
|
100
|
+
artifacts = ["src/kiapi/api/ui/static/**"]
|
|
95
101
|
|
|
96
102
|
[tool.hatch.metadata]
|
|
97
103
|
allow-direct-references = true
|
|
@@ -100,6 +106,13 @@ allow-direct-references = true
|
|
|
100
106
|
# The development lockfile resolves on Apple Silicon (kiapi pulls MLX wheels).
|
|
101
107
|
environments = ["sys_platform == 'darwin' and platform_machine == 'arm64'"]
|
|
102
108
|
|
|
109
|
+
[tool.uv.sources]
|
|
110
|
+
# Opt-in Qwen3.8 image and Omni media-prefix APC, pending upstream releases.
|
|
111
|
+
# Published wheels retain the official 0.7.1 dependency and conservative fallback.
|
|
112
|
+
mlx-vlm = { git = "https://github.com/kiarina/mlx-vlm.git", rev = "6581ba8c2f2dbc8b994cb0a350532a4bec59abc2" }
|
|
113
|
+
# Qwen-Image-2.1 editing and RGBA output (mflux-community/mflux#741), pending upstream release.
|
|
114
|
+
mflux = { git = "https://github.com/kiarina/mflux.git", rev = "144a6becfb587bcaa0139758131faf0a7930ae18" }
|
|
115
|
+
|
|
103
116
|
[dependency-groups]
|
|
104
117
|
dev = [
|
|
105
118
|
"pytest>=9.0.3",
|
|
@@ -29,6 +29,10 @@ from .image.seedvr2.router import router as seedvr2_router
|
|
|
29
29
|
from .image.zimage.router import router as zimage_router
|
|
30
30
|
from .jobs.router import router as jobs_router
|
|
31
31
|
from .models.router import router as models_router
|
|
32
|
+
from .setup.router import router as setup_router
|
|
33
|
+
from .ui.router import ASSETS_PATH as ui_assets_path
|
|
34
|
+
from .ui.router import assets as ui_assets
|
|
35
|
+
from .ui.router import router as ui_router
|
|
32
36
|
from .video.ltx2.router import router as ltx2_router
|
|
33
37
|
from .web.router import router as web_router
|
|
34
38
|
|
|
@@ -38,6 +42,7 @@ COMMON_OPENAPI_PATHS = (
|
|
|
38
42
|
"/health",
|
|
39
43
|
"/v1/files",
|
|
40
44
|
"/v1/jobs",
|
|
45
|
+
"/v1/setup",
|
|
41
46
|
)
|
|
42
47
|
CAPABILITY_DESCRIPTION_DOMAIN_ORDER = (
|
|
43
48
|
"chat",
|
|
@@ -151,3 +156,6 @@ app.include_router(acestep_router)
|
|
|
151
156
|
app.include_router(audiogen_router)
|
|
152
157
|
app.include_router(ltx2_router)
|
|
153
158
|
app.include_router(web_router)
|
|
159
|
+
app.include_router(setup_router)
|
|
160
|
+
app.include_router(ui_router)
|
|
161
|
+
app.mount(ui_assets_path, ui_assets, name="ui")
|
|
@@ -49,10 +49,19 @@ class _Choice(BaseModel):
|
|
|
49
49
|
)
|
|
50
50
|
|
|
51
51
|
|
|
52
|
+
class _PromptTokensDetails(BaseModel):
|
|
53
|
+
cached_tokens: int = Field(
|
|
54
|
+
description="Prompt tokens reused from the automatic prefix cache."
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
|
|
52
58
|
class _Usage(BaseModel):
|
|
53
59
|
prompt_tokens: int = Field(description="Tokens in the prompt.")
|
|
54
60
|
completion_tokens: int = Field(description="Tokens generated.")
|
|
55
61
|
total_tokens: int = Field(description="Sum of prompt and completion tokens.")
|
|
62
|
+
prompt_tokens_details: _PromptTokensDetails = Field(
|
|
63
|
+
description="Detailed accounting for prompt tokens."
|
|
64
|
+
)
|
|
56
65
|
|
|
57
66
|
|
|
58
67
|
class _Timings(BaseModel):
|
|
@@ -13,11 +13,12 @@ import json
|
|
|
13
13
|
import logging
|
|
14
14
|
import re
|
|
15
15
|
from collections.abc import AsyncIterator
|
|
16
|
+
from contextlib import suppress
|
|
16
17
|
from copy import deepcopy
|
|
17
18
|
from typing import Any
|
|
18
19
|
|
|
19
|
-
from fastapi import APIRouter, Depends, HTTPException
|
|
20
|
-
from fastapi.responses import StreamingResponse
|
|
20
|
+
from fastapi import APIRouter, Depends, HTTPException, Request
|
|
21
|
+
from fastapi.responses import Response, StreamingResponse
|
|
21
22
|
|
|
22
23
|
from kiapi.api import (
|
|
23
24
|
REQUIRE_AUTH,
|
|
@@ -28,6 +29,7 @@ from kiapi.api import (
|
|
|
28
29
|
from kiapi.api._settings import settings_manager
|
|
29
30
|
from kiapi.capabilities.chat import ChatRequest, handle_chat
|
|
30
31
|
from kiapi.core.app import AppContext
|
|
32
|
+
from kiapi.core.job import Job
|
|
31
33
|
from kiapi.core.memory import MemoryBudgetError
|
|
32
34
|
from kiapi.core.model import UnknownModelError, model_registry
|
|
33
35
|
from kiapi.core.setup import SetupRequiredError
|
|
@@ -71,9 +73,10 @@ _DATA_URL_BASE64 = re.compile(
|
|
|
71
73
|
)
|
|
72
74
|
async def chat_completions(
|
|
73
75
|
req: ChatRequest,
|
|
76
|
+
request: Request,
|
|
74
77
|
ctx: AppContext = Depends(get_ctx),
|
|
75
78
|
worker: Worker = Depends(get_worker),
|
|
76
|
-
) -> dict |
|
|
79
|
+
) -> dict | Response:
|
|
77
80
|
"""Generate a chat completion (OpenAI-compatible).
|
|
78
81
|
|
|
79
82
|
Accepts the OpenAI `chat.completions` request shape with multimodal
|
|
@@ -102,8 +105,11 @@ async def chat_completions(
|
|
|
102
105
|
|
|
103
106
|
loop = asyncio.get_running_loop()
|
|
104
107
|
queue: asyncio.Queue[dict | None] = asyncio.Queue()
|
|
108
|
+
last_chunk: dict[str, Any] | None = None
|
|
105
109
|
|
|
106
110
|
def emit(chunk: dict) -> None:
|
|
111
|
+
nonlocal last_chunk
|
|
112
|
+
last_chunk = chunk
|
|
107
113
|
loop.call_soon_threadsafe(queue.put_nowait, chunk)
|
|
108
114
|
|
|
109
115
|
def finish_stream() -> None:
|
|
@@ -111,7 +117,7 @@ async def chat_completions(
|
|
|
111
117
|
|
|
112
118
|
def thunk(): # type: ignore
|
|
113
119
|
try:
|
|
114
|
-
return handle_chat(ctx, req, emit=emit)
|
|
120
|
+
return handle_chat(ctx, req, emit=emit, job=job)
|
|
115
121
|
finally:
|
|
116
122
|
finish_stream()
|
|
117
123
|
|
|
@@ -129,14 +135,17 @@ async def chat_completions(
|
|
|
129
135
|
yield _sse(item)
|
|
130
136
|
|
|
131
137
|
try:
|
|
132
|
-
await asyncio.shield(fut)
|
|
138
|
+
result = await asyncio.shield(fut)
|
|
133
139
|
except Exception as exc:
|
|
134
140
|
yield _sse(_stream_error(exc))
|
|
141
|
+
else:
|
|
142
|
+
if req.stream_options and req.stream_options.include_usage:
|
|
143
|
+
yield _sse(_stream_usage_chunk(result, last_chunk))
|
|
135
144
|
yield _sse("[DONE]")
|
|
136
145
|
except asyncio.CancelledError:
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
146
|
+
job.request_cancel()
|
|
147
|
+
fut.cancel()
|
|
148
|
+
raise
|
|
140
149
|
|
|
141
150
|
return StreamingResponse(
|
|
142
151
|
events(),
|
|
@@ -148,10 +157,23 @@ async def chat_completions(
|
|
|
148
157
|
)
|
|
149
158
|
|
|
150
159
|
job = ctx.job_store.create(type="chat", params={"model": req.model})
|
|
151
|
-
fut = await worker.submit(job, lambda: handle_chat(ctx, req))
|
|
160
|
+
fut = await worker.submit(job, lambda: handle_chat(ctx, req, job=job))
|
|
161
|
+
disconnect_task = asyncio.create_task(
|
|
162
|
+
_cancel_on_disconnect(request, job, fut),
|
|
163
|
+
name=f"chat-disconnect-{job.id}",
|
|
164
|
+
)
|
|
152
165
|
|
|
153
166
|
try:
|
|
154
|
-
return await asyncio.wait_for(
|
|
167
|
+
return await asyncio.wait_for(
|
|
168
|
+
asyncio.shield(fut), timeout=settings.sync_timeout_s
|
|
169
|
+
)
|
|
170
|
+
except asyncio.CancelledError:
|
|
171
|
+
disconnected = job.cancel_requested()
|
|
172
|
+
job.request_cancel()
|
|
173
|
+
fut.cancel()
|
|
174
|
+
if disconnected:
|
|
175
|
+
return Response(status_code=499)
|
|
176
|
+
raise
|
|
155
177
|
except TimeoutError:
|
|
156
178
|
raise HTTPException( # noqa: B904
|
|
157
179
|
status_code=504,
|
|
@@ -169,6 +191,10 @@ async def chat_completions(
|
|
|
169
191
|
if exc.__class__.__name__ in ("MediaError", "CapabilityError"):
|
|
170
192
|
raise HTTPException(status_code=400, detail=str(exc)) # noqa: B904
|
|
171
193
|
raise HTTPException(status_code=500, detail=f"generation failed: {exc}") # noqa: B904
|
|
194
|
+
finally:
|
|
195
|
+
disconnect_task.cancel()
|
|
196
|
+
with suppress(asyncio.CancelledError):
|
|
197
|
+
await disconnect_task
|
|
172
198
|
|
|
173
199
|
|
|
174
200
|
register_capability_endpoints(router, name="chat", base_path="/v1/chat")
|
|
@@ -251,3 +277,26 @@ def _sse(payload) -> str: # type: ignore
|
|
|
251
277
|
|
|
252
278
|
def _stream_error(exc: BaseException) -> dict:
|
|
253
279
|
return {"error": {"message": str(exc), "type": exc.__class__.__name__}}
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
async def _cancel_on_disconnect(
|
|
283
|
+
request: Request, job: Job, fut: asyncio.Future
|
|
284
|
+
) -> None:
|
|
285
|
+
while not fut.done():
|
|
286
|
+
if await request.is_disconnected():
|
|
287
|
+
job.request_cancel()
|
|
288
|
+
fut.cancel()
|
|
289
|
+
return
|
|
290
|
+
await asyncio.sleep(0.1)
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
def _stream_usage_chunk(result: dict, last_chunk: dict[str, Any] | None) -> dict:
|
|
294
|
+
last_chunk = last_chunk or {}
|
|
295
|
+
return {
|
|
296
|
+
"id": last_chunk.get("id", result.get("id")),
|
|
297
|
+
"object": "chat.completion.chunk",
|
|
298
|
+
"created": last_chunk.get("created", result.get("created")),
|
|
299
|
+
"model": last_chunk.get("model", result.get("model")),
|
|
300
|
+
"choices": [],
|
|
301
|
+
"usage": result["usage"],
|
|
302
|
+
}
|
|
@@ -47,8 +47,8 @@ async def generate_qwen_endpoint(
|
|
|
47
47
|
Plain text-to-image by default; supply `init_image` (+ optional
|
|
48
48
|
`image_strength`) to run img2img instead — use `/v1/image/qwen/edit` for
|
|
49
49
|
natural-language single/multi-image editing. The same endpoint serves both
|
|
50
|
-
`sync` and `async` via `mode`. This endpoint
|
|
51
|
-
|
|
50
|
+
`sync` and `async` via `mode`. This endpoint accepts the `image` (default)
|
|
51
|
+
and `image-2.1` model variants; `image-2.1` does not take `init_image`.
|
|
52
52
|
|
|
53
53
|
Sync content negotiation: a single image is produced, so unless the client
|
|
54
54
|
asks for JSON the raw image bytes are returned with `X-Kiapi-File-Id` /
|
|
@@ -64,12 +64,13 @@ async def generate_qwen_endpoint(
|
|
|
64
64
|
spec = model_registry.resolve("qwen", req.model or "image")
|
|
65
65
|
except UnknownModelError as exc:
|
|
66
66
|
raise HTTPException(status_code=400, detail=str(exc)) # noqa: B904
|
|
67
|
-
if spec.name
|
|
67
|
+
if spec.name not in ("image", "image-2.1"):
|
|
68
68
|
raise HTTPException(
|
|
69
|
-
status_code=400,
|
|
69
|
+
status_code=400,
|
|
70
|
+
detail="qwen generate requires model 'image' or 'image-2.1'",
|
|
70
71
|
)
|
|
71
72
|
try:
|
|
72
|
-
validate_generate(req)
|
|
73
|
+
validate_generate(req, variant=spec.name)
|
|
73
74
|
except ValidationError as exc:
|
|
74
75
|
raise HTTPException(status_code=422, detail=str(exc)) # noqa: B904
|
|
75
76
|
|
|
@@ -104,8 +105,8 @@ async def edit_qwen_endpoint(
|
|
|
104
105
|
Takes a list of `images` (FileRefs, single or multi-image) plus a
|
|
105
106
|
natural-language `prompt`. For plain image-to-image from a single seed image,
|
|
106
107
|
use `init_image` on `/v1/image/qwen/generate` instead. The same endpoint
|
|
107
|
-
serves both `sync` and `async` via `mode`. This endpoint
|
|
108
|
-
`edit-2509` model
|
|
108
|
+
serves both `sync` and `async` via `mode`. This endpoint accepts the
|
|
109
|
+
`edit-2509` (default) and `image-2.1` model variants.
|
|
109
110
|
|
|
110
111
|
Sync content negotiation, transient-model behavior (`loras` / `quantize`
|
|
111
112
|
override), and the ImageResponse `result` shape match
|
|
@@ -115,12 +116,13 @@ async def edit_qwen_endpoint(
|
|
|
115
116
|
spec = model_registry.resolve("qwen", req.model or "edit-2509")
|
|
116
117
|
except UnknownModelError as exc:
|
|
117
118
|
raise HTTPException(status_code=400, detail=str(exc)) # noqa: B904
|
|
118
|
-
if spec.name
|
|
119
|
+
if spec.name not in ("edit-2509", "image-2.1"):
|
|
119
120
|
raise HTTPException(
|
|
120
|
-
status_code=400,
|
|
121
|
+
status_code=400,
|
|
122
|
+
detail="qwen edit requires model 'edit-2509' or 'image-2.1'",
|
|
121
123
|
)
|
|
122
124
|
try:
|
|
123
|
-
validate_edit(req)
|
|
125
|
+
validate_edit(req, variant=spec.name)
|
|
124
126
|
except ValidationError as exc:
|
|
125
127
|
raise HTTPException(status_code=422, detail=str(exc)) # noqa: B904
|
|
126
128
|
|
|
@@ -24,3 +24,11 @@ class OpenAIModelSpec(BaseModel):
|
|
|
24
24
|
description="Owner marker for OpenAI-compatible model lists.",
|
|
25
25
|
examples=["kiapi"],
|
|
26
26
|
)
|
|
27
|
+
context_window: int | None = Field(
|
|
28
|
+
default=None,
|
|
29
|
+
description=(
|
|
30
|
+
"Maximum prompt plus output tokens, read from the model's config. "
|
|
31
|
+
"Null until the model is set up."
|
|
32
|
+
),
|
|
33
|
+
examples=[262144],
|
|
34
|
+
)
|
|
@@ -2,6 +2,7 @@ import time
|
|
|
2
2
|
|
|
3
3
|
from fastapi import APIRouter
|
|
4
4
|
|
|
5
|
+
from kiapi.capabilities.chat import read_context_window
|
|
5
6
|
from kiapi.core.model import model_registry
|
|
6
7
|
|
|
7
8
|
from ._schemas.openai_model_spec import OpenAIModelSpec
|
|
@@ -23,7 +24,11 @@ async def list_openai_compatible_chat_models() -> ModelListResponse:
|
|
|
23
24
|
/v1/{domain}/{family}/models.
|
|
24
25
|
"""
|
|
25
26
|
data = [
|
|
26
|
-
OpenAIModelSpec(
|
|
27
|
+
OpenAIModelSpec(
|
|
28
|
+
id=spec.name,
|
|
29
|
+
created=_CREATED,
|
|
30
|
+
context_window=read_context_window(spec),
|
|
31
|
+
)
|
|
27
32
|
for spec in model_registry.list_specs("chat")
|
|
28
33
|
]
|
|
29
34
|
return ModelListResponse(data=data)
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
from typing import Literal, Protocol
|
|
2
|
+
|
|
3
|
+
from kiapi.core.model import ModelSpec
|
|
4
|
+
from kiapi.core.setup import SetupResource, SetupStatus
|
|
5
|
+
|
|
6
|
+
from .._views.setup_model_state import SetupModelState
|
|
7
|
+
from .._views.setup_resource_state import SetupResourceState
|
|
8
|
+
from .._views.setup_response import SetupResponse
|
|
9
|
+
from .._views.setup_summary import SetupSummary
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class _StatusManager(Protocol):
|
|
13
|
+
def status(self, resource: SetupResource) -> SetupStatus: ...
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def build_setup_response(
|
|
17
|
+
specs: list[ModelSpec], manager: _StatusManager
|
|
18
|
+
) -> SetupResponse:
|
|
19
|
+
# Models often share a resource (e.g. SeedVR2 3b and 7b), so check each once.
|
|
20
|
+
states: dict[str, SetupResourceState] = {}
|
|
21
|
+
models = []
|
|
22
|
+
for spec in sorted(specs, key=lambda s: (s.domain, s.family)):
|
|
23
|
+
resources = []
|
|
24
|
+
for resource in spec.setup_resources:
|
|
25
|
+
if resource.key not in states:
|
|
26
|
+
status = manager.status(resource)
|
|
27
|
+
states[resource.key] = SetupResourceState(
|
|
28
|
+
kind=resource.kind,
|
|
29
|
+
label=resource.label,
|
|
30
|
+
ready=status.ready,
|
|
31
|
+
disk_gb=resource.disk_gb,
|
|
32
|
+
detail=status.detail,
|
|
33
|
+
activate_command=f"kiapi activate --repo {resource.label}",
|
|
34
|
+
)
|
|
35
|
+
resources.append(states[resource.key])
|
|
36
|
+
models.append(
|
|
37
|
+
SetupModelState(
|
|
38
|
+
domain=spec.domain,
|
|
39
|
+
family=spec.family,
|
|
40
|
+
name=spec.name,
|
|
41
|
+
default=spec.default,
|
|
42
|
+
status=_model_status(resources),
|
|
43
|
+
size_gb=sum(r.disk_gb or 0.0 for r in resources),
|
|
44
|
+
resources=resources,
|
|
45
|
+
)
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
unique = list(states.values())
|
|
49
|
+
summary = SetupSummary(
|
|
50
|
+
models_total=len(models),
|
|
51
|
+
models_ready=sum(1 for m in models if m.status != "missing"),
|
|
52
|
+
resources_total=len(unique),
|
|
53
|
+
resources_ready=sum(1 for r in unique if r.ready),
|
|
54
|
+
installed_gb=sum(r.disk_gb or 0.0 for r in unique if r.ready),
|
|
55
|
+
total_gb=sum(r.disk_gb or 0.0 for r in unique),
|
|
56
|
+
)
|
|
57
|
+
return SetupResponse(summary=summary, data=models)
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
def _model_status(
|
|
61
|
+
resources: list[SetupResourceState],
|
|
62
|
+
) -> Literal["ready", "missing", "none"]:
|
|
63
|
+
if not resources:
|
|
64
|
+
return "none"
|
|
65
|
+
return "ready" if all(r.ready for r in resources) else "missing"
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
from typing import Literal
|
|
2
|
+
|
|
3
|
+
from pydantic import BaseModel, Field
|
|
4
|
+
|
|
5
|
+
from .setup_resource_state import SetupResourceState
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class SetupModelState(BaseModel):
|
|
9
|
+
domain: str = Field(..., description="Modality bucket.", examples=["image"])
|
|
10
|
+
family: str = Field(..., description="Family identifier.", examples=["zimage"])
|
|
11
|
+
name: str = Field(..., description="Model variant name.", examples=["base"])
|
|
12
|
+
default: bool = Field(
|
|
13
|
+
...,
|
|
14
|
+
description="Whether this is the family's default variant.",
|
|
15
|
+
examples=[False],
|
|
16
|
+
)
|
|
17
|
+
status: Literal["ready", "missing", "none"] = Field(
|
|
18
|
+
...,
|
|
19
|
+
description="ready when every resource is present, missing when any is "
|
|
20
|
+
"absent, none when the model needs no setup.",
|
|
21
|
+
examples=["missing"],
|
|
22
|
+
)
|
|
23
|
+
size_gb: float = Field(
|
|
24
|
+
...,
|
|
25
|
+
description="Approximate total on-disk size of the model's resources in GB.",
|
|
26
|
+
examples=[19.0],
|
|
27
|
+
)
|
|
28
|
+
resources: list[SetupResourceState] = Field(
|
|
29
|
+
default_factory=list,
|
|
30
|
+
description="Setup resources the model needs.",
|
|
31
|
+
)
|