diff --git a/tasks/workstation/linux/software/llm.yml b/tasks/workstation/linux/software/llm.yml index 8cf08b0..432e94e 100644 --- a/tasks/workstation/linux/software/llm.yml +++ b/tasks/workstation/linux/software/llm.yml @@ -811,6 +811,50 @@ mode: "0644" when: codium_config + - name: Workstation | Linux | Software | LLMs | Models | qwen-code | Config + ansible.builtin.copy: + dest: "{{ user_user.home }}/.qwen/settings.json" + content: | + { + "$version": 4, + "env": { + "OLLAMA_API_KEY": "ollama" + }, + "model": { + "name": "qwen2.5-coder:3b", + "baseUrl": "http://127.0.0.1:11434/v1" + }, + "modelProviders": { + "openai": [ + {% for llm in llm_installs %} + {% if llm.model in llm_models.stdout %} + {% if "code" in llm.purpose %} + + { + "baseUrl": "http://127.0.0.1:11434/v1", + "envKey": "OLLAMA_API_KEY", + "id": "{{ llm.model }}", + "name": "{{ llm.provider }}" + }, + + {% endif %} + {% endif %} + {% endfor %} + ] + }, + "security": { + "auth": { + "baseUrl": "http://127.0.0.1:11434/v1", + "selectedType": "openai" + } + }, + "ui": { + "autoModeAcknowledged": true + } + } + mode: "0644" + when: qwen_code_enabled + # Models - End # when: ansible_pkg_mgr == "pacman"