Skip to main content

Model Traits

Model traits are small, model-specific settings that tell Lis Novel how to talk to a model and how to interpret its output. Traits are automatically detected when possible, stored for reuse, and can be overridden per model if a provider behaves differently than expected.

Tool cache optimization​

Tool cache optimization helps preserve cached AI chat input when the available tools change. Supported models on direct OpenAI API-key connections enable it automatically. You can disable it for an individual model.

For a custom OpenAI-compatible endpoint, open LLM Providers → Configure traits for the model and choose Test and enable. The test sends up to four small synthetic API requests and may incur API charges. It sends no manuscript, Lore, prompts or chat history, and it does not run writing tools. You can cancel the test.

The optimization stays disabled if the test fails, is interrupted or cannot establish compatibility. Changes to the endpoint, API key, organization, protocol or relevant compatibility settings require another test. A connection rename or an unrelated model-limit change does not require retesting. Successful verification survives reopening the app.

Disable turns the optimization off. Use automatic restores the default policy: supported direct OpenAI models qualify automatically; custom endpoints still need verification. Positive capability overrides cannot bypass that requirement. This feature requires the Responses protocol and a model configuration that permits tools and mid-conversation system messages.

A successful test establishes compatibility, not measured cache savings. Actual cost and latency benefits depend on the endpoint, model and conversation. Writing approvals and tool permissions stay the same.

What traits control​

Traits influence two main areas:

  1. Streaming reasoning parsing
    Some models emit reasoning or analysis in a separate channel or tags. Traits tell Lis Novel how to detect and show that “thinking” content separately from the final answer.

  2. Request parameters & capabilities
    Traits describe whether a model supports options like reasoning effort, tools, or vision. Lis Novel uses these to enable or disable UI controls and to avoid sending unsupported parameters. Known model IDs use bundled catalog defaults on any endpoint. Conflicting or unreported capabilities remain unknown. Your overrides take precedence.

Default behavior (no traits)​

If no traits are detected or configured:

  • Lis Novel assumes no special reasoning wrapper.
  • It will not try to parse or display reasoning unless it is detected automatically.
  • Optional parameters like reasoning effort are treated as unsupported unless evidence says otherwise.

Recognized model families (built-in defaults)​

Lis Novel includes automatic recognition rules for certain model families. When a model ID or name matches one of these families, the listed defaults are applied:

Family IDMatch ruleDefaults applied
gpt-ossModel ID or name matches gpt-oss-20b or gpt-oss-120bsupportsReasoningEffort = true
phi-4-reasoningModel ID or name contains phi-4-reasoningreasoningWrapper = think-tag

What “harmony” means​

The harmony wrapper is the OpenAI-style format:

<|channel|>analysis<|message|>
...reasoning...
<|channel|>final<|message|>
...final answer...

If a model uses this format, Lis Novel can cleanly separate “thinking” from the final output.

What “think-tag” means​

The think-tag wrapper is XML-style:

<think>...reasoning...</think>

Lis Novel also recognizes <analysis> and <thinking> by default if no explicit tag is configured.

Automatic detection (runtime)​

If a model isn’t recognized by family, Lis Novel watches the stream and tries to infer the wrapper:

  • If it sees harmony markers, it sets reasoningWrapper = harmony.
  • If it sees <think>, <analysis>, or <thinking>, it sets reasoningWrapper = think-tag and stores the tag pair.

Stream detection applies during the current generation. Save a model override to persist a specific wrapper.

What you can override​

From LLM Providers → Model Traits, you can override any of the following:

  • Reasoning wrapper (harmony, think-tag, none)
  • Reasoning tags (<start> / </end>)
  • Supports reasoning effort
  • Supports tools
  • Supports vision
  • Total context limit, per-message limit, and outline output reservation
  • Maximum output tokens (a response ceiling, separate from the reservation)
  • JSON-object output
  • Model API protocol

Overrides are per provider + model. They do not affect other connections or models.

How overrides are applied​

Defaults resolve in this order, strongest first:

  1. Your per-connection/model overrides.
  2. Actual provider or runtime observations, including loaded context limits.
  3. Bundled model catalog defaults and Lis Novel's JSON-support list.
  4. Model-family rules and name-based hints.
  5. Unknown-model defaults.

Catalog lookup uses the exact model ID, ignoring surrounding spaces. Renamed, prefixed, or quantized IDs may need overrides. When catalog sources disagree about a capability, Lis Novel leaves it unknown rather than guessing from the name.

Context defaults and output budgets​

When context capacity is unknown, Lis Novel uses a 128,000-token estimate for chat registration and outline/review request checks. Ollama uses configured num_ctx when available and this estimate otherwise; LM Studio uses the estimate until you set an override. Confirmed limits and your overrides take priority, including smaller values. The estimate does not change the server’s actual allocation. Set Total context limit here to match your server.

Output settings are separate: outline/review checks reserve 2,048 tokens for the answer by default, and chat uses a 32,000-token maximum output when model metadata has no output ceiling. Requests also leave a 10% context safety margin. You can change the per-model output reservation and maximum output in Model Traits; these values do not change total context capacity.

JSON-object output and protocol​

Choose Use built-in default, Enabled, or Disabled for JSON-object output. The dialog shows the effective value and its source. The initial built-in list enables glm-5.3-flash, based on an OpenCode Go test; your gateway may behave differently. Other IDs remain unknown unless configured.

JSON mode applies to structured generation such as novel outlines. Prose and chat remain ordinary text. JSON mode helps with response format, but Lis Novel still checks the proposal's fields and scene links. If the endpoint explicitly rejects the JSON parameter before generating content, the outline request can retry with its JSON instruction alone. Technical details records that fallback.

Model API protocol selects the API for writing, rewrites, outlines and chat through the same configured integration. Compatible endpoints can use Responses or Chat Completions from model defaults or a matching override. Native Anthropic and Google connections retain their own APIs; an incompatible override cannot translate a server into another provider. Anthropic outlines use JSON instructions and validation; Gemini uses its native JSON MIME type when JSON-object output is enabled. Resetting a choice to Use built-in default removes only that override.

Reasoning effort​

Reasoning capability does not necessarily mean that a model offers selectable effort. Lis Novel exposes advertised native choices, including Minimal, Extra high and Max when available. Conflicting choices remain unavailable; it does not add a medium or off choice automatically. When Off is advertised, prose generation sends the model's advertised disabled value. Anthropic controls follow Pi's native supported thinking levels, including ordinary defaults when Pi does not explicitly disable them. An explicit reasoning-support override can enable the existing low/medium/high controls when your endpoint accepts them.

The reasoning selector follows the selected model. Models that always reason offer their supported effort levels without Off. Models with no adjustable levels have no selector. When you switch models, an unsupported previous choice is replaced by a supported choice shown in the control. Omitting an optional effort setting leaves the model's normal reasoning behavior in place.

Supported GPT-6 chat models on direct OpenAI API-key connections use Pi's native cache-preserving effort updates. Changing between supported reasoning levels can keep earlier context eligible for caching. Off, where available, retains Pi's normal behavior and can start a new cache prefix. Custom gateways keep their existing effort handling; passing the separate Tool cache optimization test does not enable thinking-cache support. Actual savings depend on the model and cache reuse.

On older Anthropic models with budget-based thinking, the output limit covers both thinking and the answer. Lis Novel leaves at least 1,024 tokens available for the answer when the total allowance is 2,048 or more. Smaller allowances above 1,024 remain usable, with 1,024 thinking tokens and the remainder available for the answer. If the allowance is 1,024 or less, increase the output allowance or turn thinking off. These rules do not change adaptive thinking.

When the context limit is known, prose and outline requests reduce their maximum output to fit the remaining context with a safety margin. This does not change the separate outline output reservation. Saving a connection keeps its resolved model defaults visible without requiring another connection test.

Tips & troubleshooting​

  • Thinking shows in final output:
    Set reasoningWrapper = think-tag and specify the correct tags, or force harmony if the model uses channel markers.

  • Reasoning never shows:
    Check the wrapper type and tags. Some models use custom tags like <final> or <answer> — set your start/end tags explicitly.

  • Reasoning effort control is missing:
    Enable supportsReasoningEffort in overrides only if your provider really accepts Lis Novel's current reasoning-effort values.

  • Model uses tools or vision but UI hides controls:
    Set supportsTools or supportsVision to true in overrides.

Extending recognized defaults​

If a new model family needs built-in defaults, add a new family rule in the core app. This is intended for advanced users or contributors; see the developer documentation for implementation details.

Unknown tool support withholds writing tools and tool-dependent workflows while allowing text chat. Confirm support from your provider/model documentation before enabling Supports tools. Catalog metadata, saved credentials and a successful connection test describe different parts of the connection; none alone confirms every workflow capability.