# ValueError: Unknown model format: 'h5'. Supported formats: 'tf', 'keras'

- **ID:** `tensorflow/unknown-model-save-format`
- **Domain:** tensorflow
- **Category:** config_error
- **Error Code:** `MSF`
- **Verification:** ai_generated
- **Fix Rate:** 90%

## Root Cause

Saving a model with .h5 extension is not supported in TF2's default save format; only SavedModel or Keras native format is allowed.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| tensorflow 2.13.0 | active | — | — |
| tensorflow 2.14.0 | active | — | — |

## Workarounds

1. **Use model.save('my_model.keras') with the native Keras format.** (95% success)
   ```
   Use model.save('my_model.keras') with the native Keras format.
   ```
2. **Use model.save('my_model', save_format='tf') for SavedModel format.** (90% success)
   ```
   Use model.save('my_model', save_format='tf') for SavedModel format.
   ```
3. **Explicitly set save_format='h5' in model.save() to force HDF5: model.save('my_model.h5', save_format='h5')** (85% success)
   ```
   Explicitly set save_format='h5' in model.save() to force HDF5: model.save('my_model.h5', save_format='h5')
   ```

## Dead Ends

- **** — Renaming file extension to .tf doesn't change underlying format. (60% fail)
- **** — Installing h5py doesn't add .h5 support to TF2 save API. (90% fail)
