Skip to content

Releases: clbrge/mohdel

mohdel v0.114.0

14 Jun 11:49

Choose a tag to compare

Added

  • Anthropic per-TTL cache-creation accounting. The streaming adapter now reads
    usage.cache_creation.ephemeral_1h_input_tokens and exposes
    cacheWrite1hInputTokens on the done result. computeCost prices the 1h write
    tier via a new optional spec field cacheWrite1hPrice; the 5m portion
    (cacheWriteInputTokens − cacheWrite1hInputTokens) stays on cacheWritePrice.
    A request may mix TTLs, so both tiers can be non-zero.
  • Gemini implicit-cache read accounting. The adapter now reads
    usageMetadata.cachedContentTokenCount and exposes cacheReadInputTokens on
    the done result, priced via the existing cacheReadPrice spec field.

Fixed

  • Gemini cached input was billed at full inputPrice. Cached tokens are now
    subtracted from inputTokens (subset convention, matching the OpenAI adapter)
    and priced at cacheReadPrice, so reported cost reflects the provider's
    cached-token discount.
  • Anthropic 1h cache writes were priced at the 5m rate. They now bill at
    cacheWrite1hPrice when the spec provides it.

Notes

  • Additive and backward-compatible. When cacheWrite1hInputTokens is absent or a
    spec omits cacheWrite1hPrice, the whole write bills at cacheWritePrice
    prior behaviour. Realizing the corrected rates requires catalog specs to carry
    cacheWrite1hPrice (Anthropic) and cacheReadPrice (Gemini); without them the
    new fields are observability-only and cost is unchanged.

mohdel v0.113.0

13 Jun 06:31

Choose a tag to compare

Added

  • Qwen Cloud provider (qwen/*) — OpenAI-compatible chat completions
    against Alibaba's international DashScope endpoint
    (dashscope-intl.aliyuncs.com/compatible-mode/v1), key via
    QWEN_API_SK. Thinking is wired through the new qwen
    reasoning-field variant: outputEffort maps to enable_thinking
    plus a numeric thinking_budget from the spec's
    thinkingEffortLevels; Qwen hybrid models think by default, so
    effort none sends an explicit enable_thinking: false.

mohdel v0.112.0

10 Jun 12:26

Choose a tag to compare

Added

  • POST /v1/transcription on thin-gate's data plane — closes the
    "factory path only" gap from 0.111.0; the cross-process client can
    now transcribe via callTranscription(envelope, { socketPath })
    from mohdel/client. Same one-shot shape as /v1/image: plain JSON
    response, no streaming, no enforcer, op: "transcription" driver
    tag. audio.fileUri is file:// (gate sessions read the path —
    requires a shared filesystem with the caller) or data: (inline,
    subject to the 16 MiB body cap). Rust protocol structs
    (TranscriptionEnvelope / TranscriptionResult), conformance
    fixtures, and an end-to-end session-dispatch test included; the
    image and transcription paths now share one one-shot pool-exchange
    helper in the gate.

mohdel v0.111.0

10 Jun 10:25

Choose a tag to compare

Added

  • Speech-to-text via model.transcribe(audio, options?) — a third call
    primitive alongside answer() and image(). One shared adapter posts
    multipart audio to the OpenAI-compatible /audio/transcriptions
    endpoint; registered for groq, mistral, and openai. Audio comes
    from a file:// or data: URI; result is
    { status, text, language, durationSeconds, cost, timestamps }.
    Factory path only for now — thin-gate has no /v1/transcription route
    yet, so the cross-process client cannot transcribe.
  • mo transcribe <model> <audio-file> CLI command — MIME type guessed
    from the extension (--mime to override), --language / --prompt
    hints, --json output, duration/cost summary on stderr.
  • Catalog support for transcription entries: type: "transcription",
    transcriptionPrice (USD per audio minute), "audio" in
    inputFormat. Cost is duration × per-minute price when the provider
    reports duration, with a token-pricing fallback for OpenAI's
    gpt-4o-*-transcribe models (computeTranscriptionCost in
    _pricing.js).
  • Live transcription smoke tests (test/live/transcription.live.test.js),
    key-gated per provider; the audio fixture is a generated sine WAV.

Changed

  • README repositioned around the gateway wedge new "How it compares"
    section (LiteLLM, Vercel AI SDK, OpenRouter, raw SDKs).
  • package.json description rewritten in searcher vocabulary:
    LiteLLM-style unified API, provider names spelled out, per-call USD
    cost tracking, speech-to-text.

mohdel v0.110.0

09 Jun 08:59

Choose a tag to compare

Fixed

  • toEnvelopePrompt now accepts the tool role in addition to tool_result
    in the factory { system?, messages } prompt shape, carrying toolCallId
    and toolName onto the envelope.

mohdel v0.109.0

05 Jun 09:35

Choose a tag to compare

Changed

  • fireworks provider definition moved into alphabetical position in
    providers.js (between cerebras and gemini). No behavioral change —
    the provider config is byte-for-byte identical, only its source order
    changed.
  • @anthropic-ai/sdk ^0.98.0 → ^0.100.1
  • @google/genai ^2.6.0 → ^2.8.0
  • groq-sdk ^1.2.0 → ^1.2.1
  • openai ^6.39.0 → ^6.42.0
  • @clack/prompts ^1.4.0 → ^1.5.1 (optional)
  • lint-staged ^17.0.5 → ^17.0.7 (dev)
  • release-it ^20.0.1 → ^20.2.0 (dev)
  • vitest ^4.1.7 → ^4.1.8 (dev)

mohdel v0.108.2

22 May 13:33

Choose a tag to compare

The release-it after:bump hook now refreshes both package-lock.json
and Cargo.lock after the version bump, so CI's npm ci succeeds and
the working tree stays clean through the cargo build. No runtime changes.

mohdel v0.108.1

22 May 13:24

Choose a tag to compare

No code changes from 0.108.0. The 0.108.0 release was tagged but
never landed on the npm registry — the publish workflow was migrated
to npm trusted publishing (OIDC) mid-release and the original tag was
cut against the legacy token-based workflow. 0.108.1 is the first
version of the 0.108 line actually available on npm.

mohdel v0.108.0

22 May 12:17

Choose a tag to compare

Changed

  • Session log lines now carry trace context as a nested
    span: { traceId, spanId, traceFlags } object instead of flat
    traceId / spanId fields at the root, matching the standard
    OpenTelemetry pino convention. The public createLogger API and the
    wire/event protocol are unchanged.
  • @anthropic-ai/sdk ^0.96.0 → ^0.98.0
  • @google/genai ^2.3.0 → ^2.6.0
  • openai ^6.37.0 → ^6.39.0
  • lint-staged ^17.0.4 → ^17.0.5 (dev)
  • vitest ^4.1.6 → ^4.1.7 (dev)

mohdel v0.107.0

15 May 15:11

Choose a tag to compare

Added

  • mo doctor — single-command health check covering config dir, environment
    file, API keys per provider, curated.json parse + schema validation, and
    default-model resolution. Pretty output by default; --json for machine
    consumers. Exits 0 on success (warnings allowed) or 1 on errors.
  • JSON Schema for curated.json at config/curated.schema.json. Editors that
    speak JSON Schema (VS Code, JetBrains, Helix, Neovim with coc-json) get
    autocomplete, inline type checking, and hover docs while editing the catalog.
    Two ways to wire it: an inline $schema pointer at the top of the file, or a
    .vscode/settings.json json.schemas mapping.
  • config/curated.example.json — five worked entries (minimal, full-featured
    with thinking effort + cache pricing + leaderboard, deprecated stub, image
    generation, custom rate limits) with inline $schema pointer.
  • docs/CATALOG.md — full reference for curated.json: required vs
    recommended vs capability fields, image entries, custom-field convention,
    editor support, and the mo curate / mo model add / mo check workflow.
  • docs/GLOSSARY.md — short definitions for envelope, thin-gate, session,
    factory, creator vs provider, thinking effort, status, cooldown, and the
    rest of the recurring vocabulary.
  • docs/COOKBOOK.md — six copy-paste recipes (summarize a file, stream to
    terminal, swap providers via env var, tool-use round trip, vision, batch
    with cost totals).
  • --help for mo model add and mo curate (and the mo curate alias),
    each with concrete examples and pointers to the catalog docs.
  • Friendly next-step hints in mo ask errors: model not in catalog →
    mo curate <provider> / mo model add <id>; API-key missing or rejected →
    mo setup <provider>; broken deprecation chain → mo check. Hints are
    pure pattern-match on err.message/err.detail, so the lib layer stays
    neutral.
  • Top-level meta-key support in curated.json: keys starting with $ (e.g.
    $schema) or _ (e.g. _comment) are preserved on load/save but excluded
    from every iteration site (alias map, suggestion search, rank index,
    pickers, validation). Lets users embed a JSON Schema pointer or inline
    notes in the catalog without polluting downstream behaviour.
  • New src/lib/common.js helpers: isMetaKey, catalogEntries,
    catalogKeys, catalogValues — used internally by every catalog
    iteration site so meta-key filtering stays consistent.

Changed

  • README rewrite for clarity.
  • Returning-user mo menu (when at least one provider is already
    configured) leads with mo ask <model> "...", surfaces mo doctor, and
    includes mo provider setup <p> for adding a second key.
  • @anthropic-ai/sdk ^0.95.2 → ^0.96.0
  • @google/genai ^2.2.0 → ^2.3.0