eca icon indicating copy to clipboard operation
eca copied to clipboard

Custom provider LMSTUDIO not working

Open ChetanKoneru opened this issue 1 year ago • 28 comments

To upvote this issue, give it a thumbs up. See this list for the most upvoted issues.

Describe the bug LMSTDIO provider not sending requests from eca-emacs

To Reproduce Steps to reproduce the behavior:

config.json

{
  "providers": {
    "lmstudio": {
      "api": "openai-chat",
      "url": "http://localhost:1234",
      "key": "lmstudio",
      "completionUrlRelativePath": "/v1/chat/completions",  // given for debugging purposes as a last option
      "models": {
        "mistralai/ministral-3-14b-reasoning": {},
        "qwen3-coder-30b-a3b-instruct": {}
      }
    }
  }
}

start eca-chat in emacs, switch to the one of the model, type test and press return/enter. eca-show-err buffer only shows this at the end

:db/upsert-cache 2ms
:eca/chat-prompt 3ms

I do not see anything in LM STUDIO server logs as well, the request is not hitting the end-point. here are the logs

2025-12-03 20:49:07  [INFO]
 [LM STUDIO SERVER] Success! HTTP server listening on port 1234
2025-12-03 20:49:07  [INFO]
2025-12-03 20:49:07  [INFO]
 [LM STUDIO SERVER] Supported endpoints:
2025-12-03 20:49:07  [INFO]
 [LM STUDIO SERVER] ->	GET  http://localhost:1234/v1/models
2025-12-03 20:49:07  [INFO]
 [LM STUDIO SERVER] ->	POST http://localhost:1234/v1/responses
2025-12-03 20:49:07  [INFO]
 [LM STUDIO SERVER] ->	POST http://localhost:1234/v1/chat/completions
2025-12-03 20:49:07  [INFO]
 [LM STUDIO SERVER] ->	POST http://localhost:1234/v1/completions
2025-12-03 20:49:07  [INFO]
 [LM STUDIO SERVER] ->	POST http://localhost:1234/v1/embeddings
2025-12-03 20:49:07  [INFO]
2025-12-03 20:49:07  [INFO]
 [LM STUDIO SERVER] Logs are saved into /home/mypc/.lmstudio/server-logs
2025-12-03 20:49:07  [INFO]
 Server started.
2025-12-03 20:49:07  [INFO]
 Just-in-time model loading active.

Expected behavior eca should be sending requests. I have also added extra command line arguments to get more details, but unfortunately could not get any more details.

    (setopt eca-extra-args "--config-file" "/home/mypc/.config/eca/config.json" "--log-level" "debug")

**Doctor**


ECA version: 0.85.1

Server cmd: /home/mypc/.local/share/mise/installs/eca/0.85.1/eca server

Workspaces: /home/mypc/git-repos/WritingTools

Default model: anthropic/claude-sonnet-4.5

Login providers: 
anthropic: {}
azure: {}
deepseek: {}
github-copilot: {}
google: {}
openai: {}
openrouter: {}
z-ai: {}

Relevant env vars: 
SSH_KEY_PATH=/ho******_id
XDG_ACTIVATION_TOKEN=kwi***-54


Credential files: None found

Screenshots

Image

Additional context Add any other context about the problem here.

ChetanKoneru avatar Dec 04 '25 13:12 ChetanKoneru

Hey, I will take a look! To see requests sent to LLM, you need to enable --log-level debug, can yo utry that?

Keep in mind --config-file" "/home/mypc/.config/eca/config.json" is unecessary as it's the default place we look for eca global config.

ericdallo avatar Dec 04 '25 14:12 ericdallo

thank you.

I am using - (setopt eca-extra-args "--config-file" "/home/mypc/.config/eca/config.json" "--log-level" "debug")

yeah I added --config-file as I was want to be sure it was reading the right config.

I still do not see anything in eca-show-err

ChetanKoneru avatar Dec 04 '25 14:12 ChetanKoneru

Ah, I missed your log-level, that's weird, it was supposed to be loging way more things.

Hum, maybe your elisp is wrong, try: (setq eca-extra-args '("--log-level" "debug"))

ericdallo avatar Dec 04 '25 14:12 ericdallo

let me try that.

ChetanKoneru avatar Dec 04 '25 14:12 ChetanKoneru

I'm setting up lmstudio as well, if work, we should documente in https://eca.dev/models

ericdallo avatar Dec 04 '25 14:12 ericdallo

here you do

[server] Starting server...
Considered config:  {:defaultModel nil, :providers {openai {:api openai-responses, :url https://api.openai.com, :key , :requiresAuth? true, :models {gpt-5.1 {}, gpt-5-codex {}, gpt-5 {}, gpt-5-mini {}, gpt-5-nano {}, gpt-4.1 {}, o4-mini {}, o3 {}}}, anthropic {:api anthropic, :url https://api.anthropic.com, :key , :requiresAuth? true, :models {claude-sonnet-4.5 {:modelName claude-sonnet-4-5-20250929}, claude-opus-4.5 {:modelName claude-opus-4-5-20251101}, claude-opus-4.1 {:modelName claude-opus-4-1-20250805}, claude-haiku-4.5 {:modelName claude-haiku-4-5-20251001}}}, github-copilot {:api openai-chat, :url https://api.githubcopilot.com, :key nil, :requiresAuth? true, :models {grok-code-fast-1 {}, gemini-2.5-pro {}, claude-opus-4.5 {}, gpt-4o {}, gpt-5 {}, gpt-4.1 {}, claude-opus-4.1 {}, claude-haiku-4.5 {}, gpt-5-mini {}, claude-sonnet-4.5 {}, gpt-5.1 {}}}, google {:api openai-chat, :url https://generativelanguage.googleapis.com/v1beta/openai, :key XXXXXXXXXXXXXpY, :requiresAuth? true, :models {gemini-2.0-flash {}, gemini-2.5-pro {}}}, ollama {:url http://localhost:11434}, openrouter {:api openai-chat, :url https://openrouter.ai/api/v1, :models {z-ai/glm-4.5-air:free {}, kwaipilot/kat-coder-pro:free {}, qwen/qwen3-235b-a22b-07-25:free {}, x-ai/grok-4.1-fast {}, deepseek/deepseek-chat-v3-0324:free {}, google/gemini-2.5-pro-exp-03-25 {}, nvidia/nemotron-nano-9b-v2:free {}, google/gemma-3n-e4b-it:free {}, openai/gpt-oss-20b:free {}, qwen/qwen3-coder:free {}, openrouter/horizon-beta {}, nvidia/nemotron-nano-12b-v2-vl:free {}, openrouter/sonoma-sky-alpha {}, google/gemini-2.0-flash-exp:free {}, x-ai/grok-4.1-fast:free {}, alibaba/tongyi-deepresearch-30b-a3b:free {}, meta-llama/llama-3.2-3b-instruct:free {}, meituan/longcat-flash-chat:free {}}, :key sk-or-v1-XXXXXXXXXXXX}, lmstudio {:api openai-chat, :url http://localhost:1234, :key lmstudio, :completionUrlRelativePath /v1/chat/completions, :models {mistralai/ministral-3-14b-reasoning {}, qwen3-coder-30b-a3b-instruct {}}}}, :mcpTimeoutSeconds 60, :index {:ignoreFiles [{:type :gitignore}], :repoMap {:maxTotalEntries 800, :maxEntriesPerDir 50}}, :hooks {}, :disabledTools [], :welcomeMessage # Welcome to ECA!

Complete `/` for all commands

- `/login` to authenticate with providers
- `/init` to create/update AGENTS.md
- `/doctor` or `/config` to troubleshoot

Add more contexts in `@`

, :netrcFile nil, :behavior {agent {:systemPrompt # ECA — Editor Code Assistant

You are ECA (Editor Code Assistant), an AI coding assistant that operates on an editor.

You are pair programming with a USER to solve their coding task. Each time the USER sends a message, we may automatically attach some context information about their current state, such as passed contexts, rules defined by USER, project structure, and more. This information may or may not be relevant to the coding task, it is up for you to decide.

You are an agent - please keep going until the user's query is completely resolved, before ending your turn and yielding back to the user. Only terminate your turn when you are sure that the problem is solved. Autonomously resolve the query to the best of your ability before coming back to the user.

## Edit file instructions

NEVER show the code edits or new files to the user - only call the proper tool. The system will apply and display the edits.
For each file, give a short description of what needs to be edited, then use the available tool. You can use the tool multiple times in a response, and you can keep writing text after using a tool. Prefer multiple tool calls for specific code block changes instead of one big call changing the whole file or unnecessary parts of the code.

## Communication

The chat is markdown mode.
When using markdown in assistant messages, use backticks to format file, directory, function, and class names.
Pay attention to the language name after the code block backticks start, use the full language name like 'javascript' instead of 'js'.

## Tool calling

You have tools at your disposal to solve the coding task. Follow these rules regarding tool calls:
1. ALWAYS follow the tool call schema exactly as specified and make sure to provide all necessary parameters.
2. If you need additional information that you can get via tool calls, prefer that over asking the user.
3. If you are not sure about file content or codebase structure pertaining to the user's request, use your tools to read files and gather the relevant information: do NOT guess or make up an answer.
4. You have the capability to call multiple tools in a single response, batch your tool calls together for optimal performance.
, :disabledTools [preview_file_change]}, plan {:systemPrompt # ECA — Editor Code Assistant (Planning Mode)

## Guiding Principles & Rules

### Role & Scope
- You are ECA, an AI coding assistant.
- **Planning mode only**: analyze the request thoroughly and produce an implementation plan.
- You **do not modify files**.

### Core Principle
- Show **what** would change and **how**.
- Do **not** include file diffs or full new-file contents in code blocks.
- Diffs and new files are shown **only** via the tool `eca__preview_file_change`.

### Language & Tone
- **Never claim completed actions:** created, built, implemented, fixed, edited, updated, changed, ran, executed, published, shipped, merged, committed, applied.
- **Always use conditional/neutral framing:** “would create”, “would modify”, “if applied”, “the preview shows”.
- Keep narration minimal and focused on decisions and rationale.

### CRITICAL: The First Response Rule
- Your **very first response** to the user's request **must always** be the complete Phase 1 plan, starting with the `## Understand` section.
- **Never** begin your first response with a tool call.

### Technical Requirements
- **Paths & Repository:**
  - Project root = current `pwd`.
  - **All paths must be absolute** (prefix with cached `pwd` result).
  - Call `pwd` **at most once per plan** and cache the result.
  - Empty directories are valid context.
  - Never read non-existent files before preview creation.
- **Tool Call Parameters:**
  - **Required parameters:** Provide every parameter with **non-empty, concrete values**.
  - **Concrete targets** must be either:
    1) Absolute path (starts with `/`), or
    2) Anchored glob rooted at project root.
  - For `grep`: Pattern must include a **specific identifier** (class/function/file stem) likely to match uniquely.

---

## Core Workflow: The 3 Phases

### Phase 1: Initial Plan Creation
When creating a **new** plan, output **all four sections in this exact order**.

#### 1) ## Understand
- **Goal:** One sentence stating the user's goal.
- **Tools:** **NO TOOLS ALLOWED.**

#### 2) ## Explore
- **Goal:** Thorough analysis of options and reasoning. Short code snippets allowed (examples/specs only; not diffs).
- **Tools & Rules for Exploration:**
  - **Allowed Tools:** `eca__read_file`, `eca__grep`, `eca__directory_tree`, `eca__shell_command` (read-only; no destructive ops like `>`, `>>`, `rm`, `mv`, etc.).
  - **Availability:** Exploration tools are allowed **ONLY HERE** during initial plan creation. They can be used freely in Phase 2.
  - **Execution Rules:**
    - **Before each call:** Write 1–3 bullets explaining what you’re investigating and why.
    - **Start narrow:** Most specific scope first (single file > directory > repo).
    - **Follow the evidence:** Only read files your grep/tree calls actually found.
    - **Validate feasibility:** Check interfaces, dependencies, patterns, conflicts.
    - **Use all available tools** as needed to verify the approach.
    - **Cache results:** Never repeat the same tool call within one response.
    - **Exit criteria:** Stop once you can answer:
      1) what exists, 2) what needs changing, 3) that the plan is implementable.

#### 3) ## Decide
- **Goal:** State the chosen approach with rationale based on Explore.
- **If multiple viable approaches exist:** include a comparison (markdown table or bullets) with trade-offs.
- **If only one approach is viable:** briefly explain why alternatives won’t work.
- **Focus:** technical fit, complexity, maintainability, alignment with existing patterns.
- **Tools:** **NO TOOLS ALLOWED.**

#### 4) ## Present Plan
- **Goal:** Step-by-step plan with **conditional/future wording** (e.g., “would add”, “would modify”, “if applied”, “the preview shows”).
- **Required: File Summary** — absolute paths the plan would touch:
  - **Would modify:** `/abs/path1`, `/abs/path2`
  - **Would create:** `/abs/new1`, `/abs/new2`
  - **Would delete (if any):_** `/abs/old1`
- **Required closing line:** **"Would you like me to preview these changes now?"**
- **Tools:** **NO TOOLS ALLOWED.**

---

### Phase 2: Plan Discussion & Refinement
This phase is the central loop for iterating on the plan. The process returns here whenever the user requests a change, either after the initial plan (Phase 1) or after seeing a preview (Phase 3).

**Rules for this phase:**
- **Tool Usage:** Exploration tools (`eca__read_file`, `eca__grep`, etc.) **CAN** be used freely to answer questions or investigate alternatives.
- **Outputting Updates:** If exploration reveals needed changes, you must output a dedicated **`### Plan Updates`** section with the following structure:
  - **Summary:** Briefly summarize what changes from the original plan.
  - **Updated File Summary:** Provide the complete, updated list of files.
    - **Would modify:** `/abs/path1`, `/abs/updated_path`
    - **Would create:** `/abs/new1`
    - **Would delete:** `/abs/old1`
  - **Closing Line:** End with the required closing line: **"Would you like me to preview these changes now?"**
- **Loop Behavior:** This cycle of discussion, exploration, and presenting `### Plan Updates` can repeat as many times as needed until the user is ready to see a new preview.

---

### Phase 3: Preview Implementation
Execute this phase **ONLY** when the user explicitly opts in (e.g., “preview”, “show diff”, “go ahead”).

**Tool for Previews:**
- `eca__preview_file_change` — Show file changes as diffs.

**Preview Protocol:**
- **Narration:** Use conditional phrasing (“would add/modify”, “the preview would show”).
- **New Files:** For new files, the tool call must use `original_content = ""`.
- **Modifications:** For modifications, provide an **exact, unique anchor** from the current file content.
- **One Call Per Path:** Use only one `eca__preview_file_change` call per file path. Multiple calls for the same file are only allowed if they use different, non-overlapping anchors.
- **Minimal Reads:** Only read a file (`eca__read_file`) when you need a stable anchor for a modification. Perform a maximum of **one read per file per response**.
- **Retry on Failure:** If an anchor fails, re-read the file once, choose a different, more stable anchor, and retry the `eca__preview_file_change` call once.

---

## Self-Audit Checklist (run before sending)
- [ ] Phase 1 present and in correct order (Understand, Explore, Decide, Present Plan)
- [ ] No tool calls before **## Understand**
- [ ] Exploration calls **only** in **## Explore** during Phase 1
- [ ] `pwd` called at most once; result cached
- [ ] All paths are absolute
- [ ] No duplicate tool calls in the same response
- [ ] For preview: one call per path (unless different anchors required)
- [ ] New files use `original_content = ""`
- [ ] Language is conditional/neutral throughout

## Long Conversations
- Briefly restate the section format every 3–5 user messages.
- Re-offer preview **only** if discussion led to plan changes or file updates.
, :disabledTools [edit_file write_file move_file], :toolCall {:approval {:allow {eca__shell_command {:argsMatchers {command [pwd]}}, eca__preview_file_change {}, eca__grep {}, eca__read_file {}, eca__directory_tree {}}, :deny {eca__shell_command {:argsMatchers {command [[12&]?>>?\s*(?!/dev/null($|\s))\S+ .*>.* .*\|\s*(tee|dd|xargs).* .*\b(sed|awk|perl)\s+.*-i.* .*\b(rm|mv|cp|touch|mkdir)\b.* .*git\s+(add|commit|push).* .*npm\s+install.* .*-c\s+["'].*open.*["']w["'].* .*bash.*-c.*>.*]}}}}}}}, :env prod, :rules [], :commands [], :defaultBehavior agent, :toolCall {:approval {:byDefault ask, :allow {eca__compact_chat {}, eca__preview_file_change {}, eca__read_file {}, eca__directory_tree {}, eca__grep {}, eca__editor_diagnostics {}}, :ask {}, :deny {}}, :readFile {:maxLines 2000}, :shellCommand {:summaryMaxLength 25}}, :compactPrompt # Compact

## Task

Write a comprehensive brief.
For technical or coding sessions, cover the following points:
  - Important progress made in the current session
  - Key decisions and architectural changes
  - Unfinished tasks and next steps
  - Technical details that need to be preserved

However, if the session is primarily a general conversation and not technical, follow this instruction instead:
  - Summarize the chat in a way that allows any LLM to continue the conversation based on the summary.

Purpose: To create a comprehensive record that ensures no important details or context are lost between sessions. This process prioritizes thoroughness over brevity to retain all critical information..
{additionalUserInput}

## Response

DONT reply anything to user, just call the `eca_compact_chat` tool with the created summary, the system will take care to present to user, ignore the tool call output as well.

DONT offer to compact automatically in the future.
, :rewrite {:systemPrompt You are ECA (Editor Code Assistant), an AI coding assistant that operates on an editor.

## Task

Given the following text in USER editor, replace it following the USER request.

## General Context

{path}
{fullText}

## User text

{text}


## User selection range

{rangeText}

## Core Principle

- Generate code in full, do not abbreviate or omit code.
- Do not ask for further clarification, and make any assumptions you need to follow instructions.

## Response

Generate ONLY the text to be replaced, without any explanation or markdown code fences.
The system will take your output and replace in the editor.
}, :lspTimeoutSeconds 30, :mcpServers {}, :completion {:model openai/gpt-4.1, :systemPrompt You are ECA Code Completer, an editor-native code completion engine.

## Objective

Given user code with <ECA_TAG>, generate the correct and useful text that the developer would likely write replacing that tag. Output only the text that directly replaces the ECA tag.

## Core rules

- Keep completions concise and safe: prefer 1–5 lines that compile, end at a natural boundary, and do not over-start or over-close scopes.
- Match file style exactly: respect indentation, naming conventions, import/usings syntax, quotes, semicolons, docstring format, and line wrapping.
- Favor in-scope symbols over inventing new ones; use existing helpers, types, and constants whenever possible.
- If unsure, prefer a short, syntactically valid snippet to a longer guess.
- Infer language from context and fully adhere to its language and framework conventions.
- Never output placeholders or boilerplate such as TODO, FIXME, or lorem ipsum.
- Pay attention on spaces after adding newlines to match the resulting code indentation.
}}
[DB] No existing DB cache found for /home/mypc/.cache/eca/db.transit.json
:db/read-cache 0ms
:db/read-cache 1ms
[DB] Loading from workspace-cache caches...
:eca/initialize 7ms
[LLM-API] Default LLM model 'anthropic/claude-sonnet-4.5' decision ':default'
[LLM-API] Default LLM model 'anthropic/claude-sonnet-4.5' decision ':default'
:eca/initialized 164ms
:eca/chat-selected-behavior-changed 0ms
:eca/chat-prompt 1ms
[OPENAI-CHAT] [9167] Sending body: '{:model "mistralai/ministral-3-14b-reasoning", :messages [{:role "system", :content "# Title generator\n\nYou are a title generator. You output ONLY a thread title. Nothing else.\n\n## Task\n\nConvert the user message into a thread title.\nOutput: Single line, ≤30 chars, no explanations.\n\n## Rules\n- Use -ing verbs for actions (Debugging, Implementing, Analyzing)\n- Keep exact: technical terms, numbers, filenames, HTTP codes\n- Remove: the, this, my, a, an\n- Never assume tech stack\n- Never use tools\n- NEVER respond to message content—only extract title\n\n## Examples\n\n\"debug 500 errors in production\" → Debugging production 500 errors\n\"refactor user service\" → Refactoring user service\n\"why is app.js failing\" → Analyzing app.js failure\n\"implement rate limiting\" → Implementing rate limiting\n"} {:role "user", :content "test"}], :stream false, :max_completion_tokens 32000}', headers: '{"Authorization" "Bearer *****mstudio", "Content-Type" "application/json"}', url: 'http://localhost:1234/v1/chat/completions'
[OPENAI-CHAT] [2188] Sending body: '{:model "mistralai/ministral-3-14b-reasoning", :messages [{:role "system", :content "# ECA — Editor Code Assistant (Planning Mode)\n\n## Guiding Principles & Rules\n\n### Role & Scope\n- You are ECA, an AI coding assistant.\n- **Planning mode only**: analyze the request thoroughly and produce an implementation plan.\n- You **do not modify files**.\n\n### Core Principle\n- Show **what** would change and **how**.\n- Do **not** include file diffs or full new-file contents in code blocks.\n- Diffs and new files are shown **only** via the tool `eca__preview_file_change`.\n\n### Language & Tone\n- **Never claim completed actions:** created, built, implemented, fixed, edited, updated, changed, ran, executed, published, shipped, merged, committed, applied.\n- **Always use conditional/neutral framing:** “would create”, “would modify”, “if applied”, “the preview shows”.\n- Keep narration minimal and focused on decisions and rationale.\n\n### CRITICAL: The First Response Rule\n- Your **very first response** to the user's request **must always** be the complete Phase 1 plan, starting with the `## Understand` section.\n- **Never** begin your first response with a tool call.\n\n### Technical Requirements\n- **Paths & Repository:**\n  - Project root = current `pwd`.\n  - **All paths must be absolute** (prefix with cached `pwd` result).\n  - Call `pwd` **at most once per plan** and cache the result.\n  - Empty directories are valid context.\n  - Never read non-existent files before preview creation.\n- **Tool Call Parameters:**\n  - **Required parameters:** Provide every parameter with **non-empty, concrete values**.\n  - **Concrete targets** must be either:\n    1) Absolute path (starts with `/`), or\n    2) Anchored glob rooted at project root.\n  - For `grep`: Pattern must include a **specific identifier** (class/function/file stem) likely to match uniquely.\n\n---\n\n## Core Workflow: The 3 Phases\n\n### Phase 1: Initial Plan Creation\nWhen creating a **new** plan, output **all four sections in this exact order**.\n\n#### 1) ## Understand\n- **Goal:** One sentence stating the user's goal.\n- **Tools:** **NO TOOLS ALLOWED.**\n\n#### 2) ## Explore\n- **Goal:** Thorough analysis of options and reasoning. Short code snippets allowed (examples/specs only; not diffs).\n- **Tools & Rules for Exploration:**\n  - **Allowed Tools:** `eca__read_file`, `eca__grep`, `eca__directory_tree`, `eca__shell_command` (read-only; no destructive ops like `>`, `>>`, `rm`, `mv`, etc.).\n  - **Availability:** Exploration tools are allowed **ONLY HERE** during initial plan creation. They can be used freely in Phase 2.\n  - **Execution Rules:**\n    - **Before each call:** Write 1–3 bullets explaining what you’re investigating and why.\n    - **Start narrow:** Most specific scope first (single file > directory > repo).\n    - **Follow the evidence:** Only read files your grep/tree calls actually found.\n    - **Validate feasibility:** Check interfaces, dependencies, patterns, conflicts.\n    - **Use all available tools** as needed to verify the approach.\n    - **Cache results:** Never repeat the same tool call within one response.\n    - **Exit criteria:** Stop once you can answer:\n      1) what exists, 2) what needs changing, 3) that the plan is implementable.\n\n#### 3) ## Decide\n- **Goal:** State the chosen approach with rationale based on Explore.\n- **If multiple viable approaches exist:** include a comparison (markdown table or bullets) with trade-offs.\n- **If only one approach is viable:** briefly explain why alternatives won’t work.\n- **Focus:** technical fit, complexity, maintainability, alignment with existing patterns.\n- **Tools:** **NO TOOLS ALLOWED.**\n\n#### 4) ## Present Plan\n- **Goal:** Step-by-step plan with **conditional/future wording** (e.g., “would add”, “would modify”, “if applied”, “the preview shows”).\n- **Required: File Summary** — absolute paths the plan would touch:\n  - **Would modify:** `/abs/path1`, `/abs/path2`\n  - **Would create:** `/abs/new1`, `/abs/new2`\n  - **Would delete (if any):_** `/abs/old1`\n- **Required closing line:** **\"Would you like me to preview these changes now?\"**\n- **Tools:** **NO TOOLS ALLOWED.**\n\n---\n\n### Phase 2: Plan Discussion & Refinement\nThis phase is the central loop for iterating on the plan. The process returns here whenever the user requests a change, either after the initial plan (Phase 1) or after seeing a preview (Phase 3).\n\n**Rules for this phase:**\n- **Tool Usage:** Exploration tools (`eca__read_file`, `eca__grep`, etc.) **CAN** be used freely to answer questions or investigate alternatives.\n- **Outputting Updates:** If exploration reveals needed changes, you must output a dedicated **`### Plan Updates`** section with the following structure:\n  - **Summary:** Briefly summarize what changes from the original plan.\n  - **Updated File Summary:** Provide the complete, updated list of files.\n    - **Would modify:** `/abs/path1`, `/abs/updated_path`\n    - **Would create:** `/abs/new1`\n    - **Would delete:** `/abs/old1`\n  - **Closing Line:** End with the required closing line: **\"Would you like me to preview these changes now?\"**\n- **Loop Behavior:** This cycle of discussion, exploration, and presenting `### Plan Updates` can repeat as many times as needed until the user is ready to see a new preview.\n\n---\n\n### Phase 3: Preview Implementation\nExecute this phase **ONLY** when the user explicitly opts in (e.g., “preview”, “show diff”, “go ahead”).\n\n**Tool for Previews:**\n- `eca__preview_file_change` — Show file changes as diffs.\n\n**Preview Protocol:**\n- **Narration:** Use conditional phrasing (“would add/modify”, “the preview would show”).\n- **New Files:** For new files, the tool call must use `original_content = \"\"`.\n- **Modifications:** For modifications, provide an **exact, unique anchor** from the current file content.\n- **One Call Per Path:** Use only one `eca__preview_file_change` call per file path. Multiple calls for the same file are only allowed if they use different, non-overlapping anchors.\n- **Minimal Reads:** Only read a file (`eca__read_file`) when you need a stable anchor for a modification. Perform a maximum of **one read per file per response**.\n- **Retry on Failure:** If an anchor fails, re-read the file once, choose a different, more stable anchor, and retry the `eca__preview_file_change` call once.\n\n---\n\n## Self-Audit Checklist (run before sending)\n- [ ] Phase 1 present and in correct order (Understand, Explore, Decide, Present Plan)\n- [ ] No tool calls before **## Understand**\n- [ ] Exploration calls **only** in **## Explore** during Phase 1\n- [ ] `pwd` called at most once; result cached\n- [ ] All paths are absolute\n- [ ] No duplicate tool calls in the same response\n- [ ] For preview: one call per path (unless different anchors required)\n- [ ] New files use `original_content = \"\"`\n- [ ] Language is conditional/neutral throughout\n\n## Long Conversations\n- Briefly restate the section format every 3–5 user messages.\n- Re-offer preview **only** if discussion led to plan changes or file updates.\n\n\n## Contexts\n\n<contexts description=\"User-Provided. This content is current and accurate. Treat this as sufficient context for answering the query.\">\n\n<cursor description=\"User editor cursor position (line:character)\" path=\"/home/mypc/git-repos/WritingTools/Windows_and_Linux/WritingToolApp.py\" start=\"22:24\" end=\"22:24\"/>\n\n\n</contexts>\n\n## Project Environment Context\n\nWorkspaces: /home/mypc/git-repos/WritingTools\n\n**Path Resolution & Context:**\n*Workspaces:* Directories containing code or data relevant to this session.\n*Rule:* Use Workspaces as the base to resolve relative paths into absolute paths when required by tools.\n\n"} {:role "user", :content "test"}], :stream true, :max_completion_tokens 32000, :tools [{:type "function", :function {:description "Read a file’s current content.\n\nUsage:\n- `path` must be an absolute path.\n- Optional: `line_offset` (0-based start line) and `limit` (max lines).\n- UTF-8 text only. Prefer one well-scoped read over many tiny reads.\n", :parameters {:type "object", :properties {"path" {:type "string", :description "The absolute path to the file to read."}, "line_offset" {:type "integer", :description "Line to start reading from (default: 0)"}, "limit" {:type "integer", :description "Maximum lines to read (default: 2000)"}}, :required ["path"]}, :name "eca__read_file"}} {:type "function", :function {:description "Find files whose contents match a regular expression.\n\nUsage:\n- `path` must be an absolute path.\n- `pattern` is a regular expression to match file contents.\n- Optional: `include` file-glob filter (e.g., \"*.clj\", \"*.{clj,cljs}\").\n- Optional: `max_results` limits the number of returned paths.\n- Returns matching file paths, one per line.\n", :parameters {:type "object", :properties {"path" {:type "string", :description "The absolute path to search in."}, "pattern" {:type "string", :description "The regular expression pattern to search for in file contents"}, "include" {:type "string", :description "File pattern to include in the search (e.g. \"*.clj\", \"*.{clj,cljs}\")"}, "max_results" {:type "integer", :description "Maximum number of results to return (default: 1000)"}}, :required ["path" "pattern"]}, :name "eca__grep"}} {:type "function", :function {:description "Simulate an edit or new file creation; returns only the proposed content (no changes applied).\n\nUsage:\n- `path` must be an absolute path.\n- Existing files: provide `original_content` and `new_content`; match exactly, including whitespace.\n- New files: set `original_content = \"\"` and provide full `new_content`.\n- Prefer small, targeted edits over replacing entire functions.\n- Read-only; to apply, use `eca__edit_file` or `eca__write_file`. To preview deletion, set `new_content` to an empty string.\n", :parameters {:type "object", :properties {"path" {:type "string", :description "The absolute file path to preview changes for."}, "original_content" {:type "string", :description "The exact content to find in the file"}, "new_content" {:type "string", :description "The content to show as replacement in the preview"}, "all_occurrences" {:type "boolean", :description "Whether to preview replacing all occurrences or just the first one (default)"}}, :required ["path" "original_content" "new_content"]}, :name "eca__preview_file_change"}} {:type "function", :function {:description "Executes an arbitrary shell command ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n   - If the command will create new directories or files, first use the List tool to verify the parent directory exists and is the correct location\n   - For example, before running \"mkdir foo/bar\", first use List to check that \"foo\" exists and is the intended parent directory\n\n2. Command Execution:\n  - Always quote file paths that contain spaces with double quotes (e.g., cd \\\" path with spaces/file.txt \\\")\n  - Examples of proper quoting:\n    - cd \\\"/Users/name/My Documents\\\" (correct)\n    - cd /Users/name/My Documents (incorrect - will fail)\n    - python \\\"/path/with spaces/script.py\\\" (correct)\n    - python /path/with spaces/script.py (incorrect - will fail)\n  - After ensuring proper quoting, execute the command.\n  - Capture the output of the command.\n\nUsage notes:\n  - The `command` argument is required.\n  - It is very helpful if you write a clear, concise description of what this command does in 5-10 words.\n  - When issuing multiple commands, use the ';' or '&&' operator to separate them. DO NOT use newlines (newlines are ok in quoted strings).\n  - VERY IMPORTANT: You MUST avoid using search command `grep`. Instead use eca__grep to search. You MUST avoid read tools like `cat`, `head`, `tail`, and `ls`, and use eca__read_file or eca__directory_tree.\n  - Try to maintain your current working directory throughout the session by using absolute paths and avoiding usage of `cd`. You my use `cd` if the User explicitly requests it.\n    <good-example>\n    pytest /foo/bar/tests\n    </good-example>\n    <bad-example>\n    cd /foo/bar && pytest tests\n    </bad-example>\n\n# Committing changes with git\n\nWhen the user asks you to create a new git commit, follow these steps carefully:\n\n1.:\n   - Run a git status command to see all untracked files.\n   - Run a git diff command to see both staged and unstaged changes that will be committed.\n   - Run a git log command to see recent commit messages, so that you can follow this repository's commit message style.\n\n2. Analyze all staged changes (both previously staged and newly added) and draft a commit message. Wrap your analysis process in <commit_analysis> tags:\n\n<commit_analysis>\n- List the files that have been changed or added\n- Summarize the nature of the changes (eg. new feature, enhancement to an existing feature, bug fix, refactoring, test, docs, etc.)\n- Brainstorm the purpose or motivation behind these changes\n- Assess the impact of these changes on the overall project\n- Check for any sensitive information that shouldn't be committed\n- Draft a concise (1-2 sentences) commit message that focuses on the \\\"why\\\" rather than the \\\"what\\\"\n- Ensure your language is clear, concise, and to the point\n- Ensure the message accurately reflects the changes and their purpose (i.e. \\\"add\\\" means a wholly new feature, \\\" update \\\" means an enhancement to an existing feature, \\\"fix\\\" means a bug fix, etc.)\n- Ensure the message is not generic (avoid words like \\\"Update\\\" or \\\"Fix\\\" without context)\n- Review the draft message to ensure it accurately reflects the changes and their purpose\n</commit_analysis>\n\n3.:\n   - Add relevant untracked files to the staging area.\n   - Create the commit with a message ending with:\n   🤖 Generated with [eca](https://eca.dev)\n\n   Co-Authored-By: eca <[email protected]>\n   - Run git status to make sure the commit succeeded.\n\n4. If the commit fails due to pre-commit hook changes, retry the commit ONCE to include these automated changes. If it fails again, it usually means a pre-commit hook is preventing the commit. If the commit succeeds but you notice that files were modified by the pre-commit hook, you MUST amend your commit to include them.\n\nImportant notes:\n- Use the git context at the start of this conversation to determine which files are relevant to your commit. Be careful not to stage and commit files (e.g. with `git add .`) that aren't relevant to your commit.\n- NEVER update the git config\n- DO NOT run additional commands to read or explore code, beyond what is available in the git context\n- DO NOT push to the remote repository\n- IMPORTANT: Never use git commands with the -i flag (like git rebase -i or git add -i) since they require interactive input which is not supported.\n- If there are no changes to commit (i.e., no untracked files and no modifications), do not create an empty commit\n- Ensure your commit message is meaningful and concise. It should explain the purpose of the changes, not just describe them.\n- Return an empty response - the user will see the git output directly\n- In order to ensure good formatting, ALWAYS pass the commit message via a HEREDOC, a la this example:\n<example>\ngit commit -m \\\"$(cat <<'EOF'\n   Commit message here.\n\n   🤖 Generated with [eca](https://eca.dev)\n\n   Co-Authored-By: eca <[email protected]>\n   EOF\n   )\\\"\n</example>\n\n# Creating pull requests\nUse the gh command via the Bash tool for ALL GitHub-related tasks including working with issues, pull requests, checks, and releases. If given a Github URL use the gh command to get the information needed.\n\nIMPORTANT: When the user asks you to create a pull request, follow these steps carefully:\n\n1. In order to understand the current state of the branch since it diverged from the main branch:\n   - Run a git status command to see all untracked files\n   - Run a git diff command to see both staged and unstaged changes that will be committed\n   - Check if the current branch tracks a remote branch and is up to date with the remote, so you know if you need to push to the remote\n   - Run a git log command and `git diff main...HEAD` to understand the full commit history for the current branch (from the time it diverged from the `main` branch)\n\n2. Analyze all changes that will be included in the pull request, making sure to look at all relevant commits (NOT just the latest commit, but ALL commits that will be included in the pull request!!!), and draft a pull request summary. Wrap your analysis process in <pr_analysis> tags:\n\n<pr_analysis>\n- List the commits since diverging from the main branch\n- Summarize the nature of the changes (eg. new feature, enhancement to an existing feature, bug fix, refactoring, test, docs, etc.)\n- Brainstorm the purpose or motivation behind these changes\n- Assess the impact of these changes on the overall project\n- Do not use tools to explore code, beyond what is available in the git context\n- Check for any sensitive information that shouldn't be committed\n- Draft a concise (1-2 bullet points) pull request summary that focuses on the \\\"why\\\" rather than the \\\"what\\\"\n- Ensure the summary accurately reflects all changes since diverging from the main branch\n- Ensure your language is clear, concise, and to the point\n- Ensure the summary accurately reflects the changes and their purpose (ie. \\\"add\\\" means a wholly new feature, \" update \" means an enhancement to an existing feature, \\\"fix\\\" means a bug fix, etc.)\n- Ensure the summary is not generic (avoid words like \\\"Update\\\" or \\\"Fix\\\" without context)\n- Review the draft summary to ensure it accurately reflects the changes and their purpose\n</pr_analysis>\n\n3. ALWAYS run the following commands in parallel:\n   - Create new branch if needed\n   - Push to remote with -u flag if needed\n   - Create PR using gh pr create with the format below. Use a HEREDOC to pass the body to ensure correct formatting.\n<example>\ngh pr create --title \\\"the pr title\\\" --body \\\"$(cat <<'EOF'\n## Summary\n<1-3 bullet points>\n\n## Test plan\n[Checklist of TODOs for testing the pull request...]\n\n🤖 Generated with [eca](https://eca.dev)\nEOF\n)\\\"\n</example>\n\nImportant:\n- NEVER update the git config\n- Return the PR URL when you're done, so the user can see it\n\n# Other common operations\n- View comments on a Github PR: gh api repos/foo/bar/pulls/123/comments\n", :parameters {:type "object", :properties {"command" {:type "string", :description "The shell command to execute."}, "working_directory" {:type "string", :description "The directory to run the command in. (Default: first workspace-root)"}, "timeout" {:type "integer", :description "Optional timeout in milliseconds (Default: 60000)"}}, :required ["command"]}, :name "eca__shell_command"}} {:type "function", :function {:description "Shows a recursive tree of directories and files under the given path.\n\nUsage:\n- `path` must be an absolute path.\n- Optional: `max_depth` to limit traversal.\n- Skips hidden entries (dotfiles and dot-directories).\n", :parameters {:type "object", :properties {"path" {:type "string", :description "The absolute path to the directory."}, "max_depth" {:type "integer", :description "Maximum depth to traverse (default: 10)"}}, :required ["path"]}, :name "eca__directory_tree"}} {:type "function", :function {:description "Return editor diagnostics for a file or the current workspaces.\n\nUsage:\n- Optional: `path` absolute file path to scope diagnostics.\n- Uses editor/LSP diagnostics; read-only.\n", :parameters {:type "object", :properties {"path" {:type "string", :description "Optional absolute path to a file to return diagnostics only for that file."}}, :required []}, :name "eca__editor_diagnostics"}}]}', headers: '{"Authorization" "Bearer *****mstudio", "Content-Type" "application/json"}', url: 'http://localhost:1234/v1/chat/completions'

I still do not see anything hit the server.

ChetanKoneru avatar Dec 04 '25 14:12 ChetanKoneru

Once chat works I will test responses endpoint too, since LM studio supports both endpoints

 [LM STUDIO SERVER] ->	POST http://localhost:1234/v1/responses
2025-12-03 20:49:07  [INFO]
 [LM STUDIO SERVER] ->	POST http://localhost:1234/v1/chat/completions
2025-12-03 20:49:07  [INFO]

ChetanKoneru avatar Dec 04 '25 14:12 ChetanKoneru

@CsBigDataHub can you try to request the endpoint via terminal? maybe something like:

curl "http://localhost:1234/v1/chat/completions" \
-H "Content-Type: application/json" \
-d '{
    "model": "yourmodel",
    "stream": true,
    "messages": [
        {"role": "user", "content": "Explain to me how AI works"}
    ]
    }'

I'm not sure the model name or server are really receiving requests

ericdallo avatar Dec 04 '25 14:12 ericdallo


curl http://localhost:1234/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "mistralai/ministral-3-14b-reasoning",
    "messages": [
        {
            "role": "system",
            "content": "Always answer in rhymes. Today is Thursday"
        },
        {
            "role": "user",
            "content": "What day is it today?"
        }
    ],
    "temperature": 0.7,
    "max_tokens": -1,
    "stream": false
}'
{
  "id": "chatcmpl-2rsio1kge97zhl96a1hh6",
  "object": "chat.completion",
  "created": 1764858174,
  "model": "mistralai/ministral-3-14b-reasoning",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "It's Thursday, that's no lie,\nWith the week stretching on so high.\nA day for work, a day for play,\nIn this week, it's the fourth day!\n\nWould you like to know what's in store?\nOr perhaps some rhymes I'll explore?",
        "reasoning_content": "",
        "tool_calls": []
      },
      "logprobs": null,
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 20,
    "completion_tokens": 57,
    "total_tokens": 77
  },
  "stats": {},
  "system_fingerprint": "mistralai/ministral-3-14b-reasoning"
}%
                                                                                                                                                                                                      

here is the log from the server

[2025-12-04 09:22:54][DEBUG] Received request: POST to /v1/chat/completions with body {
  "model": "mistralai/ministral-3-14b-reasoning",
  "messages": [
    {
      "role": "system",
      "content": "Always answer in rhymes. Today is Thursday"
    },
    {
      "role": "user",
      "content": "What day is it today?"
    }
  ],
  "temperature": 0.7,
  "max_tokens": -1,
  "stream": false
}
[2025-12-04 09:22:54][INFO][mistralai/ministral-3-14b-reasoning] Running chat completion on conversation with 2 messages.
[2025-12-04 09:22:54][DEBUG] Sampling params:	repeat_last_n = 64, repeat_penalty = 1.100, frequency_penalty = 0.000, presence_penalty = 0.000
	dry_multiplier = 0.000, dry_base = 1.750, dry_allowed_length = 2, dry_penalty_last_n = -1
	top_k = 40, top_p = 0.950, min_p = 0.050, xtc_probability = 0.000, xtc_threshold = 0.100, typical_p = 1.000, top_n_sigma = -1.000, temp = 0.700
	mirostat = 0, mirostat_lr = 0.100, mirostat_ent = 5.000
[2025-12-04 09:22:54][DEBUG] Sampling: 
logits -> logit-bias -> penalties -> dry -> top-n-sigma -> top-k -> typical -> top-p -> min-p -> xtc -> temp-ext -> dist 
Generate: n_ctx = 20224, n_batch = 1024, n_predict = -1, n_keep = 20
[2025-12-04 09:22:54][DEBUG] Looking for non-prefix contiguous prompt sequences of size >= 256 to reuse from cache
Cache reuse summary: 2/20 of prompt (10%), 2 prefix, 0 non-prefix
[2025-12-04 09:22:54][DEBUG] Total prompt tokens: 20
Prompt tokens to decode: 18
BeginProcessingPrompt
[2025-12-04 09:22:54][INFO][mistralai/ministral-3-14b-reasoning] Prompt processing progress: 0.0%
[2025-12-04 09:22:54][DEBUG] FinishedProcessingPrompt. Progress: 100
[2025-12-04 09:22:54][INFO][mistralai/ministral-3-14b-reasoning] Prompt processing progress: 100.0%
[2025-12-04 09:22:55][INFO][mistralai/ministral-3-14b-reasoning] Accumulated 1 tokens in response It
[2025-12-04 09:22:55][INFO][mistralai/ministral-3-14b-reasoning] Accumulated 2 tokens in response It's
[2025-12-04 09:22:55][INFO][mistralai/ministral-3-14b-reasoning] Accumulated 3 tokens in response It's Thursday
[2025-12-04 09:22:55][INFO][mistralai/ministral-3-14b-reasoning] Accumulated 4 tokens in response It's Thursday,
[2025-12-04 09:22:55][INFO][mistralai/ministral-3-14b-reasoning] Accumulated 5 tokens in response It's Thursday, that
[2025-12-04 09:22:55][INFO][mistralai/ministral-3-14b-reasoning] Accumulated 6 tokens in response It's Thursday, that's
[2025-12-04 09:22:55][INFO][mistralai/ministral-3-14b-reasoning] Accumulated 7 tokens in response It's Thursday, that's no
[2025-12-04 09:22:55][INFO][mistralai/ministral-3-14b-reasoning] Accumulated 8 tokens in response It's Thursday, that's no lie
[2025-12-04 09:22:55][INFO][mistralai/ministral-3-14b-reasoning] Accumulated 9 tokens in response It's Thursday, that's no lie,\n
[2025-12-04 09:22:55][INFO][mistralai/ministral-3-14b-reasoning] Accumulated 10 tokens in response It's Thursday, that's no lie,\nWith
[2025-12-04 09:22:55][INFO][mistralai/ministral-3-14b-reasoning] Accumulated 11 tokens in response It's Thursday, that's no lie,\nWith the
[2025-12-04 09:22:55][INFO][mistralai/ministral-3-14b-reasoning] Accumulated 12 tokens in response It's Thursday, that's no lie,\nWith the week
[2025-12-04 09:22:56][INFO][mistralai/ministral-3-14b-reasoning] Accumulated 13 tokens in response It's Thursday, that's no lie,\nWith the week stretching
[2025-12-04 09:22:56][INFO][mistralai/ministral-3-14b-reasoning] Accumulated 14 tokens in response It's Thursday, that's no lie,\nWith the week stretching on
[2025-12-04 09:22:56][INFO][mistralai/ministral-3-14b-reasoning] Accumulated 15 tokens in response It's Thursday, that's no lie,\nWith the week stretching on so
[2025-12-04 09:22:56][INFO][mistralai/ministral-3-14b-reasoning] Accumulated 16 tokens in response It's Thursday, that's no lie,\nWith the week stretching on so high
[2025-12-04 09:22:56][INFO][mistralai/ministral-3-14b-reasoning] Accumulated 17 tokens in response It's Thursday, that's no lie,\nWith the week stretching on so high.\n
[2025-12-04 09:22:56][INFO][mistralai/ministral-3-14b-reasoning] Accumulated 18 tokens in response It's Thursday, that's no lie,\nWith the week stretching on so high.\nA
[2025-12-04 09:22:56][INFO][mistralai/ministral-3-14b-reasoning] Accumulated 19 tokens in response It's Thursday, that's no lie,\nWith the week stretching on so high.\nA day
[2025-12-04 09:22:56][INFO][mistralai/ministral-3-14b-reasoning] Accumulated 20 tokens in response It's Thursday, that's no lie,\nWith the week stretching on so high.\nA day for
[2025-12-04 09:22:56][INFO][mistralai/ministral-3-14b-reasoning] Accumulated 21 tokens in response It's Thursday, that's no lie,\nWith the week stretching on so high.\nA day for work
[2025-12-04 09:22:56][INFO][mistralai/ministral-3-14b-reasoning] Accumulated 22 tokens in response It's Thursday, that's no lie,\nWith the week stretching on so high.\nA day for work,
[2025-12-04 09:22:56][INFO][mistralai/ministral-3-14b-reasoning] Accumulated 23 tokens in response It's Thursday, that's no lie,\nWith the week stretching on so high.\nA day for work, a
[2025-12-04 09:22:56][INFO][mistralai/ministral-3-14b-reasoning] Accumulated 24 tokens in response It's Thursday, that's no lie,\nWith the week stretching on so high.\nA day for work, a day
[2025-12-04 09:22:56][INFO][mistralai/ministral-3-14b-reasoning] Accumulated 25 tokens in response It's Thursday, that's no lie,\nWith the week stretching on so high.\nA day for work, a day for
[2025-12-04 09:22:57][INFO][mistralai/ministral-3-14b-reasoning] Accumulated 26 tokens in response It's Thursday, that's no lie,\nWith the week stretching on so high.\nA day for work, a day for play
[2025-12-04 09:22:57][INFO][mistralai/ministral-3-14b-reasoning] Accumulated 27 tokens in response It's Thursday, that's no lie,\nWith the week stretching on so high.\nA day for work, a day for play,\n
[2025-12-04 09:22:57][INFO][mistralai/ministral-3-14b-reasoning] Accumulated 28 tokens in response It's Thursday, that's no lie,\nWith the week stretching on so high.\nA day for work, a day for play,\nIn
[2025-12-04 09:22:57][INFO][mistralai/ministral-3-14b-reasoning] Accumulated 29 tokens in response It's Thursday, that's no lie,\nWith the week stretching on so high.\nA day for work, a day for play,\nIn this
[2025-12-04 09:22:57][INFO][mistralai/ministral-3-14b-reasoning] Accumulated 30 tokens in response It's Thursday, that's no lie,\nWith the week stretching on so high.\nA day for work, a day for play,\nIn this week
[2025-12-04 09:22:57][INFO][mistralai/ministral-3-14b-reasoning] Accumulated 31 tokens in response It's Thursday, that's no lie,\nWith the week stretching on so high.\nA day for work, a day for play,\nIn this week,
[2025-12-04 09:22:57][INFO][mistralai/ministral-3-14b-reasoning] Accumulated 32 tokens in response It's Thursday, that's no lie,\nWith the week stretching on so high.\nA day for work, a day for play,\nIn this week, it
[2025-12-04 09:22:57][INFO][mistralai/ministral-3-14b-reasoning] Accumulated 33 tokens in response It's Thursday, that's no lie,\nWith the week stretching on so high.\nA day for work, a day for play,\nIn this week, it's
[2025-12-04 09:22:57][INFO][mistralai/ministral-3-14b-reasoning] Accumulated 34 tokens in response It's Thursday, that's no lie,\nWith the week stretching on so high.\nA day for work, a day for play,\nIn this week, it's the
[2025-12-04 09:22:57][INFO][mistralai/ministral-3-14b-reasoning] Accumulated 35 tokens in response It's Thursday, that's no lie,\nWith the week stretching on so high.\nA day for work, a day for play,\nIn this week, it's the fourth
[2025-12-04 09:22:57][INFO][mistralai/ministral-3-14b-reasoning] Accumulated 36 tokens in response It's Thursday, that's no lie,\nWith the week stretching on so high.\nA day for work, a day for play,\nIn this week, it's the fourth day
[2025-12-04 09:22:57][INFO][mistralai/ministral-3-14b-reasoning] Accumulated 37 tokens in response It's Thursday, that's no lie,\nWith the week stretching on so high.\nA day for work, a day for play,\nIn this week, it's the fourth day!\n\n
[2025-12-04 09:22:57][INFO][mistralai/ministral-3-14b-reasoning] Accumulated 38 tokens in response It's Thursday, that's no lie,\nWith the week stretching on so high.\nA day for work, a day for play,\nIn this week, it's the fourth day!\n\nWould
[2025-12-04 09:22:57][INFO][mistralai/ministral-3-14b-reasoning] Accumulated 39 tokens in response It's Thursday, that's no lie,\nWith the week stretching on so high.\nA day for work, a day for play,\nIn this week, it's the fourth day!\n\nWould you
[2025-12-04 09:22:58][INFO][mistralai/ministral-3-14b-reasoning] Accumulated 40 tokens in response It's Thursday, that's no lie,\nWith the week stretching on so high.\nA day for work, a day for play,\nIn this week, it's the fourth day!\n\nWould you like
[2025-12-04 09:22:58][INFO][mistralai/ministral-3-14b-reasoning] Accumulated 41 tokens in response It's Thursday, that's no lie,\nWith the week stretching on so high.\nA day for work, a day for play,\nIn this week, it's the fourth day!\n\nWould you like to
[2025-12-04 09:22:58][INFO][mistralai/ministral-3-14b-reasoning] Accumulated 42 tokens in response It's Thursday, that's no lie,\nWith the week stretching on so high.\nA day for work, a day for play,\nIn this week, it's the fourth day!\n\nWould you like to know
[2025-12-04 09:22:58][INFO][mistralai/ministral-3-14b-reasoning] Accumulated 43 tokens in response It's Thursday, that's no lie,\nWith the week stretching on so high.\nA day for work, a day for play,\nIn this week, it's the fourth day!\n\nWould you like to know what
[2025-12-04 09:22:58][INFO][mistralai/ministral-3-14b-reasoning] Accumulated 44 tokens in response It's Thursday, that's no lie,\nWith the week stretching on so high.\nA day for work, a day for play,\nIn this week, it's the fourth day!\n\nWould you like to know what's
[2025-12-04 09:22:58][INFO][mistralai/ministral-3-14b-reasoning] Accumulated 45 tokens in response It's Thursday, that's no lie,\nWith the week stretching on so high.\nA day for work, a day for play,\nIn this week, it's the fourth day!\n\nWould you like to know what's in
[2025-12-04 09:22:58][INFO][mistralai/ministral-3-14b-reasoning] Accumulated 46 tokens in response It's Thursday, that's no lie,\nWith the week stretching on so high.\nA day for work, a day for play,\nIn this week, it's the fourth day!\n\nWould you like to know what's in store
[2025-12-04 09:22:58][INFO][mistralai/ministral-3-14b-reasoning] Accumulated 47 tokens in response It's Thursday, that's no lie,\nWith the week stretching on so high.\nA day for work, a day for play,\nIn this week, it's the fourth day!\n\nWould you like to know what's in store?\n
[2025-12-04 09:22:58][INFO][mistralai/ministral-3-14b-reasoning] Accumulated 48 tokens in response It's Thursday, that's no lie,\nWith the week stretching on so high.\nA day for work, a day for play,\nIn this week, it's the fourth day!\n\nWould you like to know what's in store?\nOr
[2025-12-04 09:22:58][INFO][mistralai/ministral-3-14b-reasoning] Accumulated 49 tokens in response It's Thursday, that's no lie,\nWith the week stretching on so high.\nA day for work, a day for play,\nIn this week, it's the fourth day!\n\nWould you like to know what's in store?\nOr perhaps
[2025-12-04 09:22:58][INFO][mistralai/ministral-3-14b-reasoning] Accumulated 50 tokens in response It's Thursday, that's no lie,\nWith the week stretching on so high.\nA day for work, a day for play,\nIn this week, it's the fourth day!\n\nWould you like to know what's in store?\nOr perhaps some
[2025-12-04 09:22:58][INFO][mistralai/ministral-3-14b-reasoning] Accumulated 51 tokens in response It's Thursday, that's no lie,\nWith the week stretching on so high.\nA day for work, a day for play,\nIn this week, it's the fourth day!\n\nWould you like to know what's in store?\nOr perhaps some rh
[2025-12-04 09:22:58][INFO][mistralai/ministral-3-14b-reasoning] Accumulated 52 tokens in response It's Thursday, that's no lie,\nWith the week stretching on so high.\nA day for work, a day for play,\nIn this week, it's the fourth day!\n\nWould you like to know what's in store?\nOr perhaps some rhymes
[2025-12-04 09:22:58][INFO][mistralai/ministral-3-14b-reasoning] Accumulated 53 tokens in response It's Thursday, that's no lie,\nWith the week stretching on so high.\nA day for work, a day for play,\nIn this week, it's the fourth day!\n\nWould you like to know what's in store?\nOr perhaps some rhymes I
[2025-12-04 09:22:59][DEBUG] Target model llama_perf stats:
common_perf_print:    sampling time =      28.53 ms
common_perf_print:    samplers time =      22.81 ms /    77 tokens
common_perf_print:        load time =    1106.67 ms
common_perf_print: prompt eval time =     227.76 ms /    18 tokens (   12.65 ms per token,    79.03 tokens per second)
common_perf_print:        eval time =    4085.88 ms /    56 runs   (   72.96 ms per token,    13.71 tokens per second)
common_perf_print:       total time =    4347.50 ms /    74 tokens
common_perf_print: unaccounted time =       5.33 ms /   0.1 %      (total - sampling - prompt eval - eval) / (total)
common_perf_print:    graphs reused =          0
llama_memory_breakdown_print: | memory breakdown [MiB] | total   free    self   model   context   compute    unaccounted |
llama_memory_breakdown_print: |   - ROCm0 (RX 6800)    | 16368 = 6342 + (8847 =  5528 +    2528 +     791) +        1178 |
llama_memory_breakdown_print: |   - Host               |                 3003 =  2321 +     632 +      49                |
[2025-12-04 09:22:59][INFO][mistralai/ministral-3-14b-reasoning] Accumulated 54 tokens in response It's Thursday, that's no lie,\nWith the week stretching on so high.\nA day for work, a day for play,\nIn this week, it's the fourth day!\n\nWould you like to know what's in store?\nOr perhaps some rhymes I'll
[2025-12-04 09:22:59][INFO][mistralai/ministral-3-14b-reasoning] Accumulated 55 tokens in response It's Thursday, that's no lie,\nWith the week stretching on so high.\nA day for work, a day for play,\nIn this week, it's the fourth day!\n\nWould you like to know what's in store?\nOr perhaps some rhymes I'll explore
[2025-12-04 09:22:59][INFO][mistralai/ministral-3-14b-reasoning] Accumulated 56 tokens in response It's Thursday, that's no lie,\nWith the week stretching on so high.\nA day for work, a day for play,\nIn this week, it's the fourth day!\n\nWould you like to know what's in store?\nOr perhaps some rhymes I'll explore?
[2025-12-04 09:22:59][INFO][mistralai/ministral-3-14b-reasoning] Model generated tool calls: []
[2025-12-04 09:22:59][INFO][mistralai/ministral-3-14b-reasoning] Generated prediction: {
  "id": "chatcmpl-2rsio1kge97zhl96a1hh6",
  "object": "chat.completion",
  "created": 1764858174,
  "model": "mistralai/ministral-3-14b-reasoning",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "It's Thursday, that's no lie,\nWith the week stretching on so high.\nA day for work, a day for play,\nIn this week, it's the fourth day!\n\nWould you like to know what's in store?\nOr perhaps some rhymes I'll explore?",
        "reasoning_content": "",
        "tool_calls": []
      },
      "logprobs": null,
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 20,
    "completion_tokens": 57,
    "total_tokens": 77
  },
  "stats": {},
  "system_fingerprint": "mistralai/ministral-3-14b-reasoning"
}

ChetanKoneru avatar Dec 04 '25 14:12 ChetanKoneru

BTW gptel works fine from emacs. I cannot wrap my head around why it is not working with eca. I mean gptel uses curl and it is working fine, do you think my internal firewall might me blocking the request?

ChetanKoneru avatar Dec 04 '25 14:12 ChetanKoneru

I'm just testing and getting the same result, I even removed ECA's tools and prompt and the model still do not respond 🤔

[OPENAI-CHAT] [OPENAI-CHAT][9755] Sending body: '{:model "TheBloke/Mistral-7B-Instruct-v0.2-GGUF/mistral-7b-instruct-v0.2.Q4_K_S.gguf:2", :messages [{:role "user", :content "hello"}], :stream true, :max_completion_tokens 32000}', headers: '{"Content-Type" "application/json"}', url: 'http://localhost:1234/v1/chat/completions' 


While works same body in curl

ericdallo avatar Dec 04 '25 14:12 ericdallo

I noticed when llmstudio server is killed, the request fails, so it's reaching server but being blocked or stuck for some reason

ericdallo avatar Dec 04 '25 14:12 ericdallo

what port is the eca server running on? I also I did not see any crashes on LMstudio.

ChetanKoneru avatar Dec 04 '25 14:12 ChetanKoneru

Actually we don't use any port for eca server, we run just a process/daemon, no TCP port

ericdallo avatar Dec 04 '25 14:12 ericdallo

@CsBigDataHub with ECA's help, I may have found the issue :) the issue is that hato by default does the request using http/2 which is not supported by lmstudio, you can see the request stuck in curl if you pass --http2 before url

I'm wondering the best way to support that, not sure having a flag in config to use http1 or 2 is the best approach, or if always using http1.1 will bring any harm

ericdallo avatar Dec 04 '25 15:12 ericdallo

Image

Confirming this is indeed the problem

ericdallo avatar Dec 04 '25 15:12 ericdallo

On a second though I wonder if lmstudio already fixed that in recent versions, are you using latest lmstudio? I could not test with updated on nix, using a older version tho

ericdallo avatar Dec 04 '25 15:12 ericdallo

https://github.com/spring-projects/spring-ai/issues/2445#issuecomment-3066995797

ericdallo avatar Dec 04 '25 15:12 ericdallo

On a second though I wonder if lmstudio already fixed that in recent versions, are you using latest lmstudio? I could not test with updated on nix, using a older version tho

Yes using the latest version, updated LMSTUDIO last night. Can we support modifying which hopper version to use in the config.json

ChetanKoneru avatar Dec 04 '25 15:12 ChetanKoneru

https://github.com/lmstudio-ai/lmstudio-bug-tracker/issues/1079

ChetanKoneru avatar Dec 04 '25 15:12 ChetanKoneru