Skip to content

Update Stoa to v1.0.2 and document OpenAI-compatible LLM config #2

@jarvis-flarex

Description

@jarvis-flarex

Goal

Update Accounting to consume github.com/flarexio/stoa v1.0.2, and update config.example.yaml to document the new OpenAI-compatible LLM configuration added by that Stoa release.

Background

flarexio/stoa v1.0.2 includes PR flarexio/stoa#45:

  • Adds BaseURL to llm/openai.Config.
  • Keeps APIKey and BaseURL environment fallback behavior.
  • Explicit config values should take precedence over environment defaults.

Accounting currently depends on:

github.com/flarexio/stoa v1.0.1

Accounting's config.example.yaml currently documents only:

llm:
  model: gpt-5.4-mini

and says OPENAI_API_KEY must be set in the environment. It should be updated to show the new settings supported by the Stoa OpenAI adapter.

Scope

Allowed changes:

  • Update go.mod / go.sum to use github.com/flarexio/stoa v1.0.2.
  • Wire Accounting's LLM config into the updated Stoa OpenAI adapter fields if Accounting has an app-level config struct for llm settings.
  • Update config.example.yaml to document the new OpenAI-compatible provider configuration.
  • Update README or CLI help text if it currently says the API key can only come from OPENAI_API_KEY.
  • Add or update tests for config parsing / adapter construction behavior if applicable.

Out of scope:

  • Reintroducing config into Stoa itself.
  • Changing unrelated accounting domain behavior.
  • Replacing the OpenAI adapter abstraction.
  • Logging, printing, or committing real API keys.

Requirements

  • Bump Stoa dependency to v1.0.2.
  • Extend Accounting's config shape, if needed, so the llm section can carry:
    • model
    • api_key / apiKey
    • base_url / baseURL
  • Ensure explicit config values are passed into the OpenAI adapter and take precedence over environment defaults.
  • Preserve existing environment-variable-only behavior for users who do not put credentials or base URL in config.
  • Update config.example.yaml with safe placeholder values, for example:
llm:
  model: gpt-5.4-mini
  # api_key may be omitted to use OPENAI_API_KEY from the environment.
  api_key: ${OPENAI_API_KEY}
  # base_url may be omitted for default OpenAI; set for OpenAI-compatible providers.
  base_url: https://api.openai.com/v1

Use the actual field names supported by Accounting's config parser. Do not include a real API key.

Acceptance Criteria

  • go.mod references github.com/flarexio/stoa v1.0.2.
  • config.example.yaml documents model, API key, and base URL settings for the LLM provider.
  • Existing users relying only on OPENAI_API_KEY still work.
  • OpenAI-compatible providers can be configured through Accounting config without relying only on process-wide env vars.
  • No API key is logged, snapshotted, or committed.
  • go test ./... passes.

Verification

Run:

go test ./...

If config-specific tests exist, run those too and mention them in the PR.

Expected Output

When complete, the worker should:

  1. Create a branch.
  2. Commit changes.
  3. Push the branch.
  4. Open exactly one PR linked to this issue for review.
  5. Do not merge the PR.
  6. Comment with the PR URL, summary, tests run, and any remaining risks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-approvedTrusted maintainer approved this agent taskagent:claude-codeTask is intended for Claude Code workerclaimed-by-claudeClaimed by Claude runnerenhancementNew feature or requestmodel:strongtype:agent-taskTask intended for an async coding agent handoff

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions