@jaypie/mcp 0.8.172 → 0.8.174

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/assets.js CHANGED
@@ -55,11 +55,11 @@ function getMcpAssetPaths() {
55
55
  */
56
56
  function getMcpBuildInfo() {
57
57
  return {
58
- commit: "a60721ed"
58
+ commit: "6d3baca1"
59
59
  ,
60
- version: "0.8.172"
60
+ version: "0.8.174"
61
61
  ,
62
- versionString: "@jaypie/mcp@0.8.172#a60721ed"
62
+ versionString: "@jaypie/mcp@0.8.174#6d3baca1"
63
63
  ,
64
64
  };
65
65
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jaypie/mcp",
3
- "version": "0.8.172",
3
+ "version": "0.8.174",
4
4
  "description": "Jaypie MCP",
5
5
  "repository": {
6
6
  "type": "git",
@@ -0,0 +1,9 @@
1
+ ---
2
+ version: 1.2.110
3
+ date: 2026-09-26
4
+ summary: Pulls @jaypie/llm 1.3.51
5
+ ---
6
+
7
+ ## Changes
8
+
9
+ - **`@jaypie/llm` 1.3.51**: `providerOptions` no longer leak to fallback providers; `fallback` entries accept their own `providerOptions` (#591).
@@ -0,0 +1,26 @@
1
+ ---
2
+ version: 1.3.50
3
+ date: 2026-09-25
4
+ summary: Mistral OCR markdown inlines tables, describes images, and renders typed blocks such as signatures; Llm.ocr answers instructions and format; fallback chains fail over on any error and linger only on the primary
5
+ ---
6
+
7
+ ## Changes
8
+
9
+ - Tables are always inline. `[tbl-0.md](tbl-0.md)` placeholders, which Mistral returns whenever `table_format` is sent, are replaced with the table content in the syntax `tables` selects
10
+ - Every image is described. Requests carry a default `bbox_annotation_format` (`{ image_type, description }`, with signature, seal, and stamp in the enum). The description becomes the image's alt text, `![Notary seal](img-2.jpeg)`, and `LlmOcrImage` gains `annotation`, `description`, and `type`
11
+ - Typed blocks are rendered. When OCR 4 returns `blocks`, page markdown is rebuilt from them, so a signature reads `[Signature: Jane Q Doe]` rather than a bare name. Header and footer blocks are skipped when extracted to their own fields
12
+ - `PAGE_COST_ANNOTATED` prices annotated pages ($5 per 1,000 on `mistral-ocr-4-1`); `usage.cost` uses it unless annotation is disabled
13
+ - `providerOptions.bbox_annotation_format` replaces the default schema, and `null` disables annotation
14
+ - `Llm.ocr` accepts `instructions` and `format` (Natural Schema, JSON Schema, or Zod) and returns the answer on `content`. Mistral answers in the same call through `document_annotation_prompt` and `document_annotation_format`; beyond its 8-page annotation limit, and on emulated engines, one text-only `operate()` over the markdown answers instead. LlamaParse throws `NotImplementedError` before submitting, so a chain fails over
15
+ - Mistral `document_annotation` is parsed from its JSON string before it lands on `annotations`
16
+ - Fallback chains (`operate`, `ocr`, `question`) fail over on any error with no retry or wait, the last entry included. When the chain is spent, the primary runs once more with its full retry policy; if that fails, the call throws. Previously transient errors retried up to six times on each entry and the last entry kept its rate-limit wait
17
+ - An explicit `retry` option on a chained call applies to the linger pass only
18
+ - `LlmRetryOptions` gains `transient: false`, which disables transient-error retries
19
+ - A caller abort (`LlmAbortError`) no longer falls over to the next entry
20
+ - The Bedrock client is built with `maxAttempts: 1`, so SDK retries no longer stack under `RetryExecutor`
21
+
22
+ ## Testing
23
+
24
+ - `npm run test -w packages/llm`: unit and Mistral hot specs pass
25
+ - Live, 2026-09-25: Mistral classifies the notarized fixture natively; a 10-page PDF answers through `mistral-large-2512` over markdown; Haiku emulation answers bare instructions as a string and `format` as an object
26
+ - Live, 2026-09-25: a notarized scan fixture (`test/fixtures/notarized.png`) returns an inline table, a described diagram, signature, and seal, and a `[Signature: Jane Q Doe]` block
@@ -0,0 +1,17 @@
1
+ ---
2
+ version: 1.3.51
3
+ date: 2026-09-26
4
+ summary: providerOptions reach only the model they were written for; fallback entries carry their own providerOptions; MODEL.FIREWORKS.DEEPSEEK moves to deepseek-v4p1-flash
5
+ ---
6
+
7
+ ## Changes
8
+
9
+ - Per-call `providerOptions` on `operate` and `ocr` reach the primary only, its linger pass included. Previously every fallback received them verbatim, so options shaped for one provider (OpenAI `reasoning`) broke a fallback on another (Gemini rejected `reasoning` in `generation_config`) and the chain provided no resilience (#591)
10
+ - `LlmFallbackConfig` gains `providerOptions`, sent only to that entry
11
+ - Fallbacks derived from a `model` array carry no `providerOptions`
12
+ - `MODEL.FIREWORKS.DEEPSEEK` is now `accounts/fireworks/models/deepseek-v4p1-flash`, the same id as `DEEPSEEK_FLASH`. Fireworks withdrew `deepseek-v4-pro-0813` from serverless (404 "Model not found"); its `COST` entry stays
13
+
14
+ ## Testing
15
+
16
+ - `npm run test -w packages/llm`: new specs cover operate (cross-provider fallback, per-entry options, linger pass) and ocr scoping
17
+ - Fireworks hot spec passes for every catalog id, deepseek-v4p1-flash included
@@ -0,0 +1,9 @@
1
+ ---
2
+ version: 0.8.174
3
+ date: 2026-09-26
4
+ summary: llm skill documents providerOptions scoping across fallback chains
5
+ ---
6
+
7
+ ## Changes
8
+
9
+ - **`llm` skill**: "Provider Options in a Chain" covers per-entry `providerOptions` on `fallback`.
package/skills/llm.md CHANGED
@@ -528,7 +528,7 @@ const { emulated, markdown, pages, usage } = await Llm.ocr(
528
528
  LLM.MODEL.HAIKU, // emulated: any provider that accepts files
529
529
  ],
530
530
  pages: "1,3-5", // 1-indexed; [1, 3, 4, 5] also works
531
- tables: "markdown", // or "html"
531
+ tables: "markdown", // table syntax; tables are always inline
532
532
  },
533
533
  );
534
534
 
@@ -541,6 +541,37 @@ usage.cost; // USD from LLM.PAGE_COST (LlamaParse: from recorded credits; emulat
541
541
  usage.tokens; // emulated only: every operate() call's usage
542
542
  ```
543
543
 
544
+ `instructions` and `format` ask for more than transcription; the answer
545
+ lands on `content` (an object shaped by `format`, or a string with only
546
+ `instructions`):
547
+
548
+ ```typescript
549
+ const { content, markdown } = await Llm.ocr("./scans/intake.pdf", {
550
+ format: {
551
+ category: ["deed", "invoice", "medical intake", "other"],
552
+ description: String,
553
+ },
554
+ instructions: "Classify the document and describe it in one sentence.",
555
+ });
556
+ content.category; // "medical intake"
557
+ ```
558
+
559
+ Mistral answers in the same call (`document_annotation_prompt` and a strict
560
+ `document_annotation_format`). Past its 8-page annotation limit, and on every
561
+ emulated engine, the answer comes from one more text-only `operate()` over the
562
+ markdown, priced into `usage`. LlamaParse does not support either option and
563
+ fails over to the next engine in the chain. Mistral's own
564
+ `document_annotation` surfaces parsed as `annotations`.
565
+
566
+ Mistral markdown is self-contained. Tables are inlined in place of
567
+ `[tbl-0.md](tbl-0.md)` placeholders. Every image is annotated, and its
568
+ description becomes the alt text (`![Notary signature of Jane Doe](img-1.jpeg)`)
569
+ and lands on `images[].description`, `.type` (`signature`, `seal`, `stamp`,
570
+ `photo`, ...), and `.annotation`. Typed blocks are rendered, so a signature
571
+ reads `[Signature: Jane Q Doe]` rather than a bare name. Annotation bills at
572
+ `LLM.PAGE_COST_ANNOTATED`; replace the schema with
573
+ `providerOptions.bbox_annotation_format` or pass `null` to disable it.
574
+
544
575
  Emulation sends each page alone (a PDF is trimmed to one page per call, so
545
576
  the model never numbers pages), asks for verbatim Markdown with
546
577
  `[UNCLEAR: best guess]` and `[ELEMENT: description]` markers, transcribes a
@@ -751,7 +782,7 @@ for await (const chunk of Llm.stream(input, {
751
782
 
752
783
  ## Fallback Providers
753
784
 
754
- Configure a chain of fallback providers that automatically retry failed calls when the primary provider fails:
785
+ Configure a chain of fallback providers. Any error (rate limit, 5xx, network flake, bad request) moves to the next entry at once, with no retry or wait. When every entry has failed, the primary runs once more with its full retry policy; if that fails, the call throws. A caller abort (`LlmAbortError`) never falls over:
755
786
 
756
787
  ```typescript
757
788
  // Instance-level configuration
@@ -778,12 +809,29 @@ const response = await Llm.operate(input, {
778
809
  });
779
810
  ```
780
811
 
812
+ ### Provider Options in a Chain
813
+
814
+ `providerOptions` belongs to the model it was written for. Per-call `providerOptions` reach the primary only (including its linger pass); a fallback receives only the `providerOptions` on its own entry, or none. Options shaped for one provider (OpenAI `reasoning`, Gemini `thinkingConfig`) would otherwise break every other provider in the chain. Prefer first-class `effort` and `temperature`, which translate per provider.
815
+
816
+ ```typescript
817
+ const response = await llm.operate(input, {
818
+ fallback: [
819
+ {
820
+ provider: "google",
821
+ model: LLM.MODEL.GEMINI_FLASH,
822
+ providerOptions: { thinkingConfig: { thinkingBudget: 1024 } },
823
+ },
824
+ ],
825
+ providerOptions: { reasoning: { summary: "detailed" } }, // primary only
826
+ });
827
+ ```
828
+
781
829
  ### Fallback Response Metadata
782
830
 
783
831
  ```typescript
784
832
  response.provider; // Which provider handled the request
785
833
  response.fallbackUsed; // true if a fallback was used
786
- response.fallbackAttempts; // Number of providers tried (1 = primary only)
834
+ response.fallbackAttempts; // Attempts made (1 = primary only; chain length + 2 when the linger pass served it)
787
835
  ```
788
836
 
789
837
  ## Instance Usage
@@ -928,9 +976,12 @@ await Llm.operate(input, {
928
976
  });
929
977
  ```
930
978
 
931
- A configured fallback chain wins over waiting: moving to the next provider is
932
- faster than sleeping, so only the final entry in the chain keeps its rate-limit
933
- budget. Waits are interruptible by the caller's `signal`.
979
+ A configured fallback chain wins over waiting. Every entry, the last included,
980
+ fails fast on any error (`retry: { rateLimit: false, transient: false }`) so the
981
+ next model takes over at once. When the whole chain fails, the primary runs one
982
+ more time with the full policy (the caller's `retry` applies here) and its error
983
+ is final. `transient: false` also works on a single call. Waits are
984
+ interruptible by the caller's `signal`.
934
985
 
935
986
  ### Loop Stops
936
987