@flutchai/flutch-sdk 0.2.14 → 0.2.15

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/README.md CHANGED
@@ -522,6 +522,43 @@ Currently supports LangGraph.js. The architecture is designed to support other g
522
522
  - **Multi-step Workflows**: Orchestrate complex AI pipelines
523
523
  - **Interactive Assistants**: Create agents with callbacks and dynamic UIs
524
524
 
525
+ ## Publishing
526
+
527
+ The package is automatically published to [npmjs.org](https://www.npmjs.com/package/@flutchai/flutch-sdk) on every merge to `main` via GitHub Actions.
528
+
529
+ ### How it works
530
+
531
+ 1. On merge to `main`, the [release workflow](.github/workflows/release.yml) runs
532
+ 2. It reads the version from `package.json`
533
+ 3. If a git tag `v{version}` does not exist yet — it creates the tag and publishes to npm
534
+ 4. If the tag already exists — all publish steps are skipped (idempotent)
535
+
536
+ Publishing uses [npm OIDC Trusted Publishing](https://docs.npmjs.com/generating-provenance-statements) — no npm token secret is required. The GitHub Actions runner authenticates directly with npmjs.org via OpenID Connect.
537
+
538
+ ### Rules
539
+
540
+ - **Bump the version before merging** — if `package.json` version matches an existing git tag, nothing will be published
541
+ - **Use semantic versioning** — `MAJOR.MINOR.PATCH` (e.g. `0.2.14`)
542
+ - `PATCH` — bug fixes, minor improvements
543
+ - `MINOR` — new backward-compatible features
544
+ - `MAJOR` — breaking changes
545
+ - **One version bump per PR** — keep version changes isolated from feature/fix changes when possible
546
+
547
+ ### Releasing a new version
548
+
549
+ ```bash
550
+ # 1. Create a branch
551
+ git checkout -b chore/bump-version-X.Y.Z
552
+
553
+ # 2. Update version in package.json
554
+ # "version": "X.Y.Z"
555
+
556
+ # 3. Push and open a PR
557
+ git push origin chore/bump-version-X.Y.Z
558
+
559
+ # 4. Merge the PR — publishing happens automatically
560
+ ```
561
+
525
562
  ## Links
526
563
 
527
564
  - [GitHub Repository](https://github.com/flutchai/node-sdk)
package/dist/index.cjs CHANGED
@@ -6655,12 +6655,17 @@ var ModelInitializer = class _ModelInitializer {
6655
6655
  modelName,
6656
6656
  defaultTemperature,
6657
6657
  defaultMaxTokens,
6658
- apiToken
6658
+ apiToken,
6659
+ baseURL
6659
6660
  }) => new mistralai.ChatMistralAI({
6660
6661
  model: modelName,
6661
6662
  temperature: defaultTemperature,
6662
6663
  maxTokens: defaultMaxTokens,
6663
- apiKey: apiToken || this.resolveApiKey("mistral" /* MISTRAL */)
6664
+ apiKey: apiToken || this.resolveApiKey("mistral" /* MISTRAL */),
6665
+ // Route through the same gateway as OpenAI/Anthropic.
6666
+ // Without serverURL, ChatMistralAI ignores FLUTCH_ROUTER_URL and calls
6667
+ // api.mistral.ai directly — inconsistent with other providers.
6668
+ serverURL: `${resolveRouterURL(baseURL)}/v1`
6664
6669
  }),
6665
6670
  ["voyageai" /* VOYAGEAI */]: () => {
6666
6671
  throw new Error("VoyageAI chat models not implemented");