rhachet-brains-openai 0.1.9 → 0.2.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.
@@ -0,0 +1,25 @@
1
+ import type { BrainSpec } from 'rhachet';
2
+ /**
3
+ * .what = supported openai brain atom slugs
4
+ * .why = enables type-safe slug specification with model variants
5
+ */
6
+ export type OpenaiBrainAtomSlug = 'openai/gpt/4o' | 'openai/gpt/4o-mini' | 'openai/gpt/4-turbo' | 'openai/gpt/4.1' | 'openai/gpt/4.1-mini' | 'openai/gpt/4.1-nano' | 'openai/o/1' | 'openai/o/1-mini' | 'openai/o/1-preview' | 'openai/o/3' | 'openai/o/3-mini' | 'openai/o/3-pro' | 'openai/o/4-mini' | 'openai/gpt/5' | 'openai/gpt/5-mini' | 'openai/gpt/5-pro' | 'openai/gpt/5-thoughtful' | 'openai/gpt/5-thoughtful-mini' | 'openai/gpt/5.1-instant' | 'openai/gpt/5.1-thoughtful' | 'openai/gpt/5.2-instant' | 'openai/gpt/5.2-pro' | 'openai/gpt/5.2-thoughtful' | 'openai/gpt/codex/5.1-max' | 'openai/gpt/codex/5.1-mini' | 'openai/gpt/codex/5.2';
7
+ /**
8
+ * .what = atom config type
9
+ * .why = shared type for model configs
10
+ */
11
+ export type BrainAtomConfig = {
12
+ model: string;
13
+ description: string;
14
+ spec: BrainSpec;
15
+ };
16
+ /**
17
+ * .what = brain spec configuration by atom slug
18
+ * .why = maps slugs to api model names, descriptions, and specs
19
+ *
20
+ * .refs
21
+ * - https://openai.com/api/pricing/
22
+ * - https://platform.openai.com/docs/models
23
+ * - https://platform.openai.com/docs/api-reference/responses
24
+ */
25
+ export declare const CONFIG_BY_ATOM_SLUG: Record<OpenaiBrainAtomSlug, BrainAtomConfig>;
@@ -1,19 +1,14 @@
1
- import { BrainAtom } from 'rhachet';
2
- /**
3
- * .what = supported openai atom slugs
4
- * .why = enables type-safe slug specification with model variants
5
- */
6
- type OpenAIAtomSlug = 'openai/gpt-4o' | 'openai/gpt-4o-mini' | 'openai/gpt-4-turbo' | 'openai/o1' | 'openai/o1-mini' | 'openai/o1-preview';
1
+ import { BrainAtom } from 'rhachet/brains';
2
+ import { type OpenaiBrainAtomSlug } from '../../domain.objects/BrainAtom.config';
7
3
  /**
8
4
  * .what = factory to generate openai brain atom instances
9
5
  * .why = enables model variant selection via slug
10
6
  *
11
7
  * .example
12
- * genBrainAtom({ slug: 'openai/gpt-4o' })
13
- * genBrainAtom({ slug: 'openai/gpt-4o-mini' }) // fast + cheap
14
- * genBrainAtom({ slug: 'openai/o1' }) // advanced reasoning
8
+ * genBrainAtom({ slug: 'openai/gpt/4o' })
9
+ * genBrainAtom({ slug: 'openai/gpt/4o-mini' }) // fast + cheap
10
+ * genBrainAtom({ slug: 'openai/o/1' }) // advanced reason
15
11
  */
16
12
  export declare const genBrainAtom: (input: {
17
- slug: OpenAIAtomSlug;
13
+ slug: OpenaiBrainAtomSlug;
18
14
  }) => BrainAtom;
19
- export {};
@@ -1,19 +1,27 @@
1
- import { BrainRepl } from 'rhachet';
1
+ import { BrainRepl } from 'rhachet/brains';
2
2
  /**
3
- * .what = supported openai codex repl slugs
3
+ * .what = supported openai brain repl slugs
4
4
  * .why = enables type-safe slug specification with model variants
5
+ *
6
+ * .structure
7
+ * openai/codex → default (5.1-max)
8
+ * openai/codex/{5.1,5.2} → version (defaults to max tier)
9
+ * openai/codex/{mini,max} → capability tier (defaults to 5.1)
10
+ * openai/codex/{mini,max}/5.1 → explicit version + tier
11
+ *
12
+ * .note = 5.2 has only one variant (gpt-5.2-codex); mini/max/5.2 slugs will be added when available
5
13
  */
6
- type CodexSlug = 'openai/codex' | 'openai/codex/max' | 'openai/codex/mini' | 'openai/codex/5.2';
14
+ export type OpenaiBrainReplSlug = 'openai/codex' | 'openai/codex/5.1' | 'openai/codex/5.2' | 'openai/codex/mini' | 'openai/codex/max' | 'openai/codex/mini/5.1' | 'openai/codex/max/5.1';
7
15
  /**
8
16
  * .what = factory to generate openai codex brain repl instances
9
17
  * .why = enables model variant selection via slug
10
18
  *
11
19
  * .example
12
- * genBrainRepl({ slug: 'openai/codex' }) // default model
13
- * genBrainRepl({ slug: 'openai/codex/mini' }) // fast + cheap
14
- * genBrainRepl({ slug: 'openai/codex/5.2' }) // most advanced
20
+ * genBrainRepl({ slug: 'openai/codex' }) // default (5.1-max)
21
+ * genBrainRepl({ slug: 'openai/codex/5.2' }) // version only (5.2)
22
+ * genBrainRepl({ slug: 'openai/codex/mini' }) // tier only (5.1-mini)
23
+ * genBrainRepl({ slug: 'openai/codex/max/5.2' }) // tier + version
15
24
  */
16
25
  export declare const genBrainRepl: (input: {
17
- slug: CodexSlug;
26
+ slug: OpenaiBrainReplSlug;
18
27
  }) => BrainRepl;
19
- export {};