Przejdź do treści
Biblioteka skilli
Programowanie · Budowanie i kod

together-sdk-patterns

/together-sdk-patterns

Opakowuje Together AI SDK v2 w typowany adapter z modelami z katalogu, ograniczonymi ponowieniami, normalizacją streamingu i rejestrem zużycia.

Licencja
MIT
Ostatnia zmiana repozytorium
26.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
2
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
4
Przestarzałość

Brak sygnałów. Repozytorium zmienione 26.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Opakowuje Together AI SDK v2 w typowany adapter z modelami z katalogu, ograniczonymi ponowieniami, normalizacją streamingu i rejestrem zużycia.

Wyzwalacze z opisu

Together SDK patternTogether client wrapperOpenAI compatibility on Together

Argumenty

/together-sdk-patterns [repository-path] [python|typescript]
Oryginalny opis (EN)

Encapsulate Together AI SDK v2 behind a typed adapter with catalog-resolved models, bounded retries, streaming normalization, usage capture, and OpenAI-compatible migration seams. Use when building a reusable Together client layer. Trigger with "Together SDK pattern", "Together client wrapper", or "OpenAI compatibility on Together".

Jak działa

  1. Overview
  2. Prerequisites
  3. Tool Discipline
  4. Current Contract
  5. Authentication
  6. Instructions
  7. Approval Boundaries
  8. Output
  9. Error Handling
  10. Examples
Sekcje z nagłówków SKILL.md, w oryginale · 69 linii, 429 słów
Podgląd SKILL.md
---
name: together-sdk-patterns
description: >-
  Encapsulate Together AI SDK v2 behind a typed adapter with catalog-resolved models, bounded retries, streaming normalization, usage capture, and OpenAI-compatible migration seams. Use when building a reusable Together client layer. Trigger with "Together SDK pattern", "Together client wrapper", or "OpenAI compatibility on Together".
argument-hint: "[repository-path] [python|typescript]"
allowed-tools: Read, Glob, Grep, WebFetch, Write, Edit
version: 1.9.0
author: Jeremy Longshore <jeremy@intentsolutions.io>
license: MIT
tags:
- saas
- together-ai
- sdk
model: inherit
effort: high
compatibility: Designed for Claude Code; live calls require network access and a Together AI project key
---
# Together AI SDK Patterns

## Overview

This skill creates an application-owned boundary around Together's native v2 client or OpenAI-compatible surface so provider changes do not leak through every caller.

## Prerequisites

- The repository's language, dependency manager, and existing client abstractions
- Required capabilities such as chat, streaming, embeddings, batch, or fine-tuning
- Latency, retry, token, and spend budgets
- A policy for model selection and deprecation response

## Tool Discipline

Use `Read`, `Glob`, and `Grep` to map existing provider calls and error handling. Use `WebFetch` for current SDK and API contracts. Use `Write` or `Edit` only to implement the approved adapter and focused tests.

## Current Contract

- Prefer the Together Python v2 client for Together-native features; v1 is maintenance-only.
- OpenAI clients require both the Together project key and `base_url="https://api.together.ai/v1"`.
- Together model IDs use provider/model names; OpenAI-native model strings return `404`.
- Normalize streaming chunks defensively and capture both ordinary usage and nested reasoning/cached-token fields when present.

## Authentication

Construct clients from runtime-injected `TOGETHER_API_KEY`. Keep the key out of adapter configuration objects that may be logged or serialized. REST and OpenAI-compatible clients send it as a Bearer token.

## Instructions

1. Inventory direct Together and OpenAI-compatible calls, consumed fields, and retry behavior.
2. Define typed request/result/error interfaces owned by the application.
3. Centralize base URL, timeouts, model policy, request bounds, and credential injection.
4. Normalize full and streaming responses without discarding finish reason, usage, warnings, or request metadata.
5. Retry only bounded transient classes with jitter; surface auth, billing, validation, and model errors immediately.
6. Add fake-transport contract tests and one opt-in live compatibility probe.

## Approval Boundaries

Do not change the default model, retry amplification, or OpenAI-to-Together routing globally without latency, quality, and cost evidence plus a rollback.

## Output

Return the adapter interface, runtime configuration contract, normalized result/error shapes, retry policy, model policy, and test evidence.

## Error Handling

| Condition | Response |
|---|---|
| OpenAI model ID returns `404` | Resolve a Together model ID; do not rewrite the error as transient. |
| Stream chunk has no choices | Skip safely and continue until terminal evidence. |
| SDK major mismatch | Stop and apply the v2 migration contract before feature work. |
| Retry budget exhausted | Return the last redacted status and retry metadata. |

## Examples

The example below shows the minimum redacted evidence expected from a successful invocation of this operator workflow.

```text
adapter=typed; sdk=together-v2; model=catalog-resolved; retries=bounded; usage=normalized
```

## Resources

- [Skill-specific official documentation](references/official-docs.md)
- [Python v2 migration](https://docs.together.ai/docs/pythonv2-migration-guide)
- [OpenAI compatibility](https://docs.together.ai/docs/inference/openai-compatibility)
- [Official Together skills](https://github.com/togethercomputer/skills)
Pliki w paczce (2)
  • SKILL.md 4 KB
  • references/official-docs.md 3 KB

Wersje

W bazie nie ma innych skilli o nazwie together-sdk-patterns.

Identyczna treść występuje jeszcze w 1 innych folderach na GitHubie. Tu pokazujemy jedną, najlepiej ocenioną kopię.

Migawka bazy z 13.11.2026 · wersja paczki ce3b8664647b (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100persona-sdk-patterns
    Projektuje typowany adapter REST dla API Persona, który zachowuje koperty JSON:API, dowody żądań i zgodne rozszerzenia, do budowy wielokrotnego klienta.
  • 100attio-sdk-patterns
    Buduje typowany klient Attio REST z tokenami per tenant, paginacją per endpoint, ustrukturyzowanymi błędami, ograniczonymi ponowieniami i testami kontraktowymi, odróżniając go od Attio App SDK.
  • 96s04-06-api-client-wrapper
    Zamienia endpointy API na typowany zestaw funkcji dla frontendu i mini programu, czyli SDK z definicjami typów.
  • 100api-sdk-generator
    Generuje kod SDK klienta, biblioteki wrapperów API, modele żądań i odpowiedzi oraz wzorce użycia w wybranym języku dla dowolnego API REST.
  • 100apollo-sdk-patterns
    Stosuje produkcyjne wzorce SDK Apollo.io przy implementacji integracji, refaktoryzacji użycia API i ustalaniu standardów zespołu.
  • 100add-adapter
    Dodaje adapter producenta lub społeczności do katalogu Chat SDK: wpis w @chat-adapter/catalog, stronę dokumentacji MDX, meta.json i changeset.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.