@llmnative/react 1.17.1 → 1.18.1

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.
@@ -43,6 +43,7 @@ export type AIConfig = {
43
43
  anthropicApiKey?: string;
44
44
  mistralApiKey?: string;
45
45
  glmApiKey?: string;
46
+ groqApiKey?: string;
46
47
  /** Cloudflare Workers AI — both apiToken and accountId are required (the account id is part of every URL). */
47
48
  cloudflare?: {
48
49
  apiToken?: string;
@@ -37,7 +37,16 @@ export interface ChatbotModelOption {
37
37
  * a highlighted row. `null` = price looked up but not found (flagged in the row);
38
38
  * omitted = the consumer has no pricing at all, nothing is shown. */
39
39
  pricing?: AIModelPricing | null;
40
+ /** Section the option is listed under (e.g. its provider). When any option has one, the
41
+ * picker renders one sticky header per group, in order of first appearance. */
42
+ group?: string;
40
43
  }
44
+ /** Consecutive-or-not options sharing a `group` end up in one section, keeping the order in
45
+ * which each group first appears; options without a group form an unnamed leading section. */
46
+ export declare const groupModelOptions: (options: ChatbotModelOption[]) => Array<{
47
+ group?: string;
48
+ options: ChatbotModelOption[];
49
+ }>;
41
50
  export declare const isFreeModelOption: (option: ChatbotModelOption) => boolean;
42
51
  export interface ChatbotProps {
43
52
  /** Attributo `name` nativo sulla textarea sottostante — puro attributo DOM, MAI un
@@ -14,6 +14,8 @@ export interface AIModelDescriptor {
14
14
  provider: string;
15
15
  model: string;
16
16
  label: string;
17
+ /** Display name of the provider (e.g. 'OpenRouter'), for grouping models by provider. */
18
+ providerLabel?: string;
17
19
  deprecated?: boolean;
18
20
  /** Absent = price not found (neither in the provider listing nor on models.dev). */
19
21
  pricing?: AIModelPricing;
@@ -0,0 +1 @@
1
+ export declare const GROQ_PROVIDER_DEFINITION: import("./shared").AIProviderDefinition;
@@ -1,7 +1,7 @@
1
1
  import { type ProviderConfigurationState } from '../ProviderConfiguration';
2
2
  import type { ProviderCredentialField } from '../ProviderDescriptor';
3
3
  import type { AICompleteRequest, AICompleteResult, AIKeyValidationResult, AIModelDescriptor, AIModelPricing, AIProviderAdapter, AIProviderCapabilities, AIRequestOptions } from './AIProvider';
4
- export type BuiltInAIProviderId = 'openai' | 'openrouter' | 'opencode' | 'openai-compatible' | 'deepseek' | 'gemini' | 'anthropic' | 'mistral' | 'glm' | 'cloudflare';
4
+ export type BuiltInAIProviderId = 'openai' | 'openrouter' | 'opencode' | 'openai-compatible' | 'deepseek' | 'gemini' | 'anthropic' | 'mistral' | 'glm' | 'cloudflare' | 'groq';
5
5
  /** A discovered model carrying the price its provider listing already reports (OpenRouter,
6
6
  * Cloudflare). Models discovered as a bare id get their price from models.dev instead. */
7
7
  export type DiscoveredAIModel = {
@@ -35,7 +35,7 @@ export type DataDriverName = 'dbRealtime' | 'firestoreDb' | 'supabaseDb' | 'mock
35
35
  export type StorageDriverName = 'firestorage' | 'supabaseStorage';
36
36
  export type AuthDriverName = 'googleAuth' | 'firebaseAuth' | 'dropboxAuth' | 'supabaseAuth';
37
37
  export type EmailDriverName = 'gmail';
38
- export type AIDriverName = 'openai' | 'openrouter' | 'opencode' | 'openai-compatible' | 'deepseek' | 'gemini' | 'anthropic' | 'mistral' | 'cloudflare';
38
+ export type AIDriverName = 'openai' | 'openrouter' | 'opencode' | 'openai-compatible' | 'deepseek' | 'gemini' | 'anthropic' | 'mistral' | 'cloudflare' | 'groq';
39
39
  export type CredentialsDriverName = 'googleServiceAccount';
40
40
  export type ServicesConfig = {
41
41
  data?: DataDriverName | string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@llmnative/react",
3
- "version": "1.17.1",
3
+ "version": "1.18.1",
4
4
  "description": "LLM-native React framework for deterministic UI generation. Data-driven by default, schema-driven optional. Ultra-low token consumption — built for AI agents, not just humans.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",