Problem: When integrated_crm_app calls llm_chat(), _get_llm_config() used
env.get_module_dbname('harnessed_agent') which returned 'crm_db' (the
calling module's DB), causing it to read stale/wrong config (qwen3-max)
instead of the correct config from default DB (qwen3.6-plus).
Fix: Remove get_module_dbname() call. LLM config is global and shared
across all modules, so always query from 'default' database.
- All sor.R() calls with orderby= and/or limit= parameters replaced
with raw SQL via sor.sqlExe() for correct execution
- Fixed in core.py (memory, sessions, workflows, executions, skills)
- Fixed in llm_client.py (config lookup)
- Fix agent_config_form.ui data_url and submit_url paths
(wwwroot/ to wwwroot/api/ needs 'api/', not '../api/')
- Add '配置管理' menu entry to menu.ui pointing to harnessed_agent_config_view CRUD
- Add /v1/chat/completions endpoint (POST) with streaming support
- Add /v1/models endpoint (GET) listing available models
- Add /v1/completions endpoint (POST) legacy compatibility
- Add llm_api.py module with OpenAI API proxy via aiohttp
- Add llm_service_url, llm_api_key, available_models to config model
- Update harnessed_agent_config_view CRUD to protect API key field
- Register new functions in init.py (harnessed_llm_chat_completions etc.)
- Add .gitignore for pycache files
Endpoints available under module path:
POST /harnessed_agent/v1/chat/completions
GET /harnessed_agent/v1/models
POST /harnessed_agent/v1/completions