Skip to content

Feat/canonical model and tool formats#92

Open
Nivesh353 wants to merge 2 commits into
open-gitagent:mainfrom
Nivesh353:feat/canonical-model-and-tool-formats
Open

Feat/canonical model and tool formats#92
Nivesh353 wants to merge 2 commits into
open-gitagent:mainfrom
Nivesh353:feat/canonical-model-and-tool-formats

Conversation

@Nivesh353

Copy link
Copy Markdown

Summary

Standardizes two declarative formats in the gitagent spec so exported agents
work correctly on downstream runtimes (notably gitagent, which silently
dropped tools/models in the old formats):

  1. Model field is now canonical provider:model (e.g. anthropic:claude-sonnet-4-6)
  2. Tool implementation now uses script: (with path: kept as a deprecated alias)

1. Canonical provider:model model format

model.preferred / model.fallback must now be provider:model — bare names
(gpt-4o) are rejected. A shared parseModel() util (splits on the first colon)
replaces the per-adapter provider-guessing logic.

  • New: src/utils/model.tsparseModel(), KNOWN_PROVIDERS, isKnownProvider()
  • Schema: agent-yaml.schema.json enforces ^[a-z0-9-]+:.+$ on preferred/fallback
  • Validation: errors on bad format, warns on unknown provider
  • Adapters/runners reformat to each target's needs (bare for claude/openai/kiro;
    provider/model for opencode/github/nanobot/openclaw; {id, provider} for gemini;
    passthrough for gitclaw). Deleted the old inferProvider/mapModelName guessers.
  • import.ts now emits canonical provider:model
  • Migrated all example agent.yaml files + spec/docs examples

2. Tool implementation.script

type: script tools now use script: (the form gitagent's runtime reads).
path: is still accepted but deprecated.

  • Schema: tool.schema.json adds script, deprecates path, requires one-of + runtime
  • Migrated example tools + spec doc

Breaking change

Agents with bare model names (gpt-4o) or no provider prefix will now fail
validation
. Migrate to provider:model (e.g. openai:gpt-4o). Tool path:
remains valid but should migrate to script: for gitagent compatibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant