Fosowl/agenticSeek · error · Exception

Together AI is not available for local use. Change…

Error message

Together AI is not available for local use. Change config.ini

What it means

together_fn() refuses to call Together AI when the provider was configured with a local server (is_local=True). Together AI is a hosted-only service, so the library blocks the call before creating the Together client request. The message points the user to config.ini.

Solutions

  1. Edit config.ini's together section to remove the local server_ip so is_local becomes False
  2. Set a valid Together AI api_key in config.ini
  3. Switch the provider in config.ini to a genuinely local option if local inference is what you want

Example fix

// before (config.ini)
[together]
server_ip = http://localhost:8000
// after
[together]
api_key = YOUR_TOGETHER_API_KEY
Defensive patterns

Strategy: validation

Validate before calling

if provider == "together" and is_local:
    raise RuntimeError("Together AI requires the hosted API; fix the [together] section in config.ini")

Try / catch

try:
    thought = provider.together_fn(history)
except Exception as e:
    logger.error("Together unavailable locally: %s", e)
    thought = local_model_fn(history)

Prevention

When it happens

Trigger: Calling together_fn() (or its provider dispatch) while self.is_local is True — config.ini's together section points at a local server_ip.

Common situations: config.ini still has local/ollama server settings from a previous setup, or a shared config copied from a local dev environment while intending to use hosted Together AI.

Related errors


AI-assisted analysis of Fosowl/agenticSeek@ae57a23577 (2026-08-30). Data as JSON: /api/errors/099e72b143927a80. Report an issue: GitHub.

Appendix: source

Thrown at sources/llm_provider.py:313

                messages=history,
            )
            if response is None:
                raise Exception("Google response is empty.")
            thought = response.choices[0].message.content
            if verbose:
                print(thought)
            return thought
        except Exception as e:
            raise Exception(f"GOOGLE API error: {str(e)}") from e

    def together_fn(self, history, verbose=False):
        """
        Use together AI for completion
        """
        from together import Together
        client = Together(api_key=self.api_key)
        if self.is_local:
            raise Exception("Together AI is not available for local use. Change config.ini")

        try:
            response = client.chat.completions.create(
                model=self.model,
                messages=history,
            )
            if response is None:
                raise Exception("Together AI response is empty.")
            thought = response.choices[0].message.content
            if verbose:
                print(thought)
            return thought
        except Exception as e:
            raise Exception(f"Together AI API error: {str(e)}") from e

    def deepseek_fn(self, history, verbose=False):
        """
        Use deepseek api to generate text.

View on GitHub (pinned to ae57a23577)